Load Data

dataset <- read.delim("raw_data/Figure3B.txt", stringsAsFactors = FALSE, header = F)

mms_levels <- dataset[1,-1]
genotype_levels <- dataset$V1[!(grepl("OP|NT", dataset$V1))]
olaparib_levels <- unique(dataset$V1[(grepl("OP|NT", dataset$V1))])

dataset <- dataset[grepl("OP|NT", dataset$V1),]
colnames(dataset) <- c("Treatment",mms_levels)

dataset[,-1] <- lapply(dataset[,-1], as.integer)

n_reps <- nrow(dataset)/length(genotype_levels)/length(olaparib_levels)

dataset$Treatment <- factor(dataset$Treatment)
dataset$genotype <-  factor(rep(genotype_levels, each = (n_reps*length(genotype_levels))))

dataset$Experiment <- factor(rep(paste0("exp", 1:(nrow(dataset)/length(olaparib_levels))),
                                 each=length(olaparib_levels)))
dataset$UID <- factor(paste0("uid", 1:(n_reps*length(genotype_levels)*length(olaparib_levels))))


# wide format
kable(dataset, row.names = F)
Treatment NT MMS_0,0003 MMS_0,0006 MMS_0,001 genotype Experiment UID
NT 2272 1946 1676 1422 WT exp1 uid1
OP_30 nM 2050 1777 1512 1228 WT exp1 uid2
OP_300 nM 1876 1568 1232 1044 WT exp1 uid3
OP_3000 nM 1348 1221 888 568 WT exp1 uid4
NT 1224 1110 1051 920 WT exp2 uid5
OP_30 nM 1140 1020 892 696 WT exp2 uid6
OP_300 nM 1080 808 596 425 WT exp2 uid7
OP_3000 nM 952 652 432 245 WT exp2 uid8
NT 1608 1553 1295 1121 WT exp3 uid9
OP_30 nM 1542 1264 1120 838 WT exp3 uid10
OP_300 nM 1208 920 755 488 WT exp3 uid11
OP_3000 nM 850 732 600 385 WT exp3 uid12
NT 1004 756 615 388 PARP1 KO exp4 uid13
OP_30 nM 960 740 540 324 PARP1 KO exp4 uid14
OP_300 nM 896 670 522 244 PARP1 KO exp4 uid15
OP_3000 nM 728 630 477 212 PARP1 KO exp4 uid16
NT 1150 955 677 422 PARP1 KO exp5 uid17
OP_30 nM 1030 888 544 398 PARP1 KO exp5 uid18
OP_300 nM 900 857 512 212 PARP1 KO exp5 uid19
OP_3000 nM 754 688 410 156 PARP1 KO exp5 uid20
NT 988 756 621 328 PARP1 KO exp6 uid21
OP_30 nM 1020 678 554 222 PARP1 KO exp6 uid22
OP_300 nM 828 655 468 128 PARP1 KO exp6 uid23
OP_3000 nM 668 545 365 120 PARP1 KO exp6 uid24
NT 2336 1756 1396 700 ALC1 KO exp7 uid25
OP_30 nM 1944 896 740 121 ALC1 KO exp7 uid26
OP_300 nM 776 616 441 101 ALC1 KO exp7 uid27
OP_3000 nM 405 324 112 38 ALC1 KO exp7 uid28
NT 1760 1540 966 588 ALC1 KO exp8 uid29
OP_30 nM 952 710 450 120 ALC1 KO exp8 uid30
OP_300 nM 422 368 320 77 ALC1 KO exp8 uid31
OP_3000 nM 332 210 102 62 ALC1 KO exp8 uid32
NT 1968 1568 999 652 ALC1 KO exp9 uid33
OP_30 nM 911 896 620 210 ALC1 KO exp9 uid34
OP_300 nM 711 669 410 141 ALC1 KO exp9 uid35
OP_3000 nM 321 114 95 40 ALC1 KO exp9 uid36
NT 2424 1855 1355 751 ALC1 KO PARP1 KO exp10 uid37
OP_30 nM 2400 1755 1080 422 ALC1 KO PARP1 KO exp10 uid38
OP_300 nM 2322 1641 850 355 ALC1 KO PARP1 KO exp10 uid39
OP_3000 nM 2188 1555 742 288 ALC1 KO PARP1 KO exp10 uid40
NT 1677 1489 1023 612 ALC1 KO PARP1 KO exp11 uid41
OP_30 nM 1512 1255 741 355 ALC1 KO PARP1 KO exp11 uid42
OP_300 nM 1155 1099 612 355 ALC1 KO PARP1 KO exp11 uid43
OP_3000 nM 922 958 588 244 ALC1 KO PARP1 KO exp11 uid44
NT 1366 1120 785 433 ALC1 KO PARP1 KO exp12 uid45
OP_30 nM 1125 980 536 328 ALC1 KO PARP1 KO exp12 uid46
OP_300 nM 1024 964 488 299 ALC1 KO PARP1 KO exp12 uid47
OP_3000 nM 952 922 399 288 ALC1 KO PARP1 KO exp12 uid48
library(reshape2)
# reshape to long format
dataset <- melt(dataset, variable.name = "MMS", value.name = "Counts")

dataset$genotype <- relevel(dataset$genotype, ref = "WT")
dataset$Experiment <- relevel(dataset$Experiment, ref = "exp1")
dataset$UID <- relevel(dataset$UID, ref = "uid1")

dataset$Olaparib <- log10(as.numeric(gsub("OP_| nM","",gsub("NT","1",dataset$Treatment))))
dataset$MMS <- as.numeric(gsub(",",".",gsub("MMS_","",gsub("NT","0",dataset$MMS))))



dataset$Offset <- NA

for(eidx in levels(dataset$Experiment)){
        
        dataset$Offset[dataset$Experiment == eidx] <- mean(dataset$Counts[dataset$Experiment == eidx])
}

dataset$NormCounts <- dataset$Counts / dataset$Offset



dataset$Offset2 <- NA

for(gidx in levels(dataset$genotype)){
        
        dataset$Offset2[dataset$genotype == gidx] <- mean(dataset$NormCounts[dataset$genotype == gidx & dataset$MMS == 0 & dataset$Olaparib == 0])
}

dataset$NormCounts2 <- dataset$NormCounts / dataset$Offset2



# long format
kable(dataset, row.names = F)
Treatment genotype Experiment UID MMS Counts Olaparib Offset NormCounts Offset2 NormCounts2
NT WT exp1 uid1 0e+00 2272 0.000000 1476.7500 1.5385136 1.532591 1.0038643
OP_30 nM WT exp1 uid2 0e+00 2050 1.477121 1476.7500 1.3881835 1.532591 0.9057755
OP_300 nM WT exp1 uid3 0e+00 1876 2.477121 1476.7500 1.2703572 1.532591 0.8288950
OP_3000 nM WT exp1 uid4 0e+00 1348 3.477121 1476.7500 0.9128153 1.532591 0.5956026
NT WT exp2 uid5 0e+00 1224 0.000000 827.6875 1.4788190 1.532591 0.9649142
OP_30 nM WT exp2 uid6 0e+00 1140 1.477121 827.6875 1.3773314 1.532591 0.8986946
OP_300 nM WT exp2 uid7 0e+00 1080 2.477121 827.6875 1.3048403 1.532591 0.8513949
OP_3000 nM WT exp2 uid8 0e+00 952 3.477121 827.6875 1.1501926 1.532591 0.7504888
NT WT exp3 uid9 0e+00 1608 0.000000 1017.4375 1.5804411 1.532591 1.0312215
OP_30 nM WT exp3 uid10 0e+00 1542 1.477121 1017.4375 1.5155722 1.532591 0.9888953
OP_300 nM WT exp3 uid11 0e+00 1208 2.477121 1017.4375 1.1872965 1.532591 0.7746988
OP_3000 nM WT exp3 uid12 0e+00 850 3.477121 1017.4375 0.8354322 1.532591 0.5451109
NT PARP1 KO exp4 uid13 0e+00 1004 0.000000 606.6250 1.6550587 1.722027 0.9611109
OP_30 nM PARP1 KO exp4 uid14 0e+00 960 1.477121 606.6250 1.5825263 1.722027 0.9189905
OP_300 nM PARP1 KO exp4 uid15 0e+00 896 2.477121 606.6250 1.4770245 1.722027 0.8577244
OP_3000 nM PARP1 KO exp4 uid16 0e+00 728 3.477121 606.6250 1.2000824 1.722027 0.6969011
NT PARP1 KO exp5 uid17 0e+00 1150 0.000000 659.5625 1.7435800 1.722027 1.0125162
OP_30 nM PARP1 KO exp5 uid18 0e+00 1030 1.477121 659.5625 1.5616412 1.722027 0.9068623
OP_300 nM PARP1 KO exp5 uid19 0e+00 900 2.477121 659.5625 1.3645409 1.722027 0.7924039
OP_3000 nM PARP1 KO exp5 uid20 0e+00 754 3.477121 659.5625 1.1431820 1.722027 0.6638584
NT PARP1 KO exp6 uid21 0e+00 988 0.000000 559.0000 1.7674419 1.722027 1.0263730
OP_30 nM PARP1 KO exp6 uid22 0e+00 1020 1.477121 559.0000 1.8246869 1.722027 1.0596158
OP_300 nM PARP1 KO exp6 uid23 0e+00 828 2.477121 559.0000 1.4812165 1.722027 0.8601587
OP_3000 nM PARP1 KO exp6 uid24 0e+00 668 3.477121 559.0000 1.1949911 1.722027 0.6939445
NT ALC1 KO exp7 uid25 0e+00 2336 0.000000 793.8750 2.9425287 3.042807 0.9670442
OP_30 nM ALC1 KO exp7 uid26 0e+00 1944 1.477121 793.8750 2.4487482 3.042807 0.8047662
OP_300 nM ALC1 KO exp7 uid27 0e+00 776 2.477121 793.8750 0.9774839 3.042807 0.3212441
OP_3000 nM ALC1 KO exp7 uid28 0e+00 405 3.477121 793.8750 0.5101559 3.042807 0.1676596
NT ALC1 KO exp8 uid29 0e+00 1760 0.000000 561.1875 3.1362067 3.042807 1.0306953
OP_30 nM ALC1 KO exp8 uid30 0e+00 952 1.477121 561.1875 1.6964027 3.042807 0.5575124
OP_300 nM ALC1 KO exp8 uid31 0e+00 422 2.477121 561.1875 0.7519768 3.042807 0.2471326
OP_3000 nM ALC1 KO exp8 uid32 0e+00 332 3.477121 561.1875 0.5916026 3.042807 0.1944266
NT ALC1 KO exp9 uid33 0e+00 1968 0.000000 645.3125 3.0496852 3.042807 1.0022605
OP_30 nM ALC1 KO exp9 uid34 0e+00 911 1.477121 645.3125 1.4117191 3.042807 0.4639529
OP_300 nM ALC1 KO exp9 uid35 0e+00 711 2.477121 645.3125 1.1017918 3.042807 0.3620972
OP_3000 nM ALC1 KO exp9 uid36 0e+00 321 3.477121 645.3125 0.4974334 3.042807 0.1634785
NT ALC1 KO PARP1 KO exp10 uid37 0e+00 2424 0.000000 1373.9375 1.7642724 1.807476 0.9760975
OP_30 nM ALC1 KO PARP1 KO exp10 uid38 0e+00 2400 1.477121 1373.9375 1.7468043 1.807476 0.9664332
OP_300 nM ALC1 KO PARP1 KO exp10 uid39 0e+00 2322 2.477121 1373.9375 1.6900332 1.807476 0.9350241
OP_3000 nM ALC1 KO PARP1 KO exp10 uid40 0e+00 2188 3.477121 1373.9375 1.5925033 1.807476 0.8810649
NT ALC1 KO PARP1 KO exp11 uid41 0e+00 1677 0.000000 912.3125 1.8381859 1.807476 1.0169908
OP_30 nM ALC1 KO PARP1 KO exp11 uid42 0e+00 1512 1.477121 912.3125 1.6573268 1.807476 0.9169291
OP_300 nM ALC1 KO PARP1 KO exp11 uid43 0e+00 1155 2.477121 912.3125 1.2660136 1.807476 0.7004319
OP_3000 nM ALC1 KO PARP1 KO exp11 uid44 0e+00 922 3.477121 912.3125 1.0106186 1.807476 0.5591327
NT ALC1 KO PARP1 KO exp12 uid45 0e+00 1366 0.000000 750.5625 1.8199684 1.807476 1.0069117
OP_30 nM ALC1 KO PARP1 KO exp12 uid46 0e+00 1125 1.477121 750.5625 1.4988758 1.807476 0.8292648
OP_300 nM ALC1 KO PARP1 KO exp12 uid47 0e+00 1024 2.477121 750.5625 1.3643101 1.807476 0.7548152
OP_3000 nM ALC1 KO PARP1 KO exp12 uid48 0e+00 952 3.477121 750.5625 1.2683820 1.807476 0.7017423
NT WT exp1 uid1 3e-04 1946 0.000000 1476.7500 1.3177586 1.532591 0.8598239
OP_30 nM WT exp1 uid2 3e-04 1777 1.477121 1476.7500 1.2033181 1.532591 0.7851527
OP_300 nM WT exp1 uid3 3e-04 1568 2.477121 1476.7500 1.0617911 1.532591 0.6928078
OP_3000 nM WT exp1 uid4 3e-04 1221 3.477121 1476.7500 0.8268156 1.532591 0.5394887
NT WT exp2 uid5 3e-04 1110 0.000000 827.6875 1.3410859 1.532591 0.8750447
OP_30 nM WT exp2 uid6 3e-04 1020 1.477121 827.6875 1.2323492 1.532591 0.8040951
OP_300 nM WT exp2 uid7 3e-04 808 2.477121 827.6875 0.9762138 1.532591 0.6369695
OP_3000 nM WT exp2 uid8 3e-04 652 3.477121 827.6875 0.7877369 1.532591 0.5139902
NT WT exp3 uid9 3e-04 1553 0.000000 1017.4375 1.5263837 1.532591 0.9959496
OP_30 nM WT exp3 uid10 3e-04 1264 1.477121 1017.4375 1.2423368 1.532591 0.8106119
OP_300 nM WT exp3 uid11 3e-04 920 2.477121 1017.4375 0.9042324 1.532591 0.5900024
OP_3000 nM WT exp3 uid12 3e-04 732 3.477121 1017.4375 0.7194545 1.532591 0.4694367
NT PARP1 KO exp4 uid13 3e-04 756 0.000000 606.6250 1.2462394 1.722027 0.7237050
OP_30 nM PARP1 KO exp4 uid14 3e-04 740 1.477121 606.6250 1.2198640 1.722027 0.7083885
OP_300 nM PARP1 KO exp4 uid15 3e-04 670 2.477121 606.6250 1.1044715 1.722027 0.6413788
OP_3000 nM PARP1 KO exp4 uid16 3e-04 630 3.477121 606.6250 1.0385329 1.722027 0.6030875
NT PARP1 KO exp5 uid17 3e-04 955 0.000000 659.5625 1.4479295 1.722027 0.8408286
OP_30 nM PARP1 KO exp5 uid18 3e-04 888 1.477121 659.5625 1.3463470 1.722027 0.7818386
OP_300 nM PARP1 KO exp5 uid19 3e-04 857 2.477121 659.5625 1.2993462 1.722027 0.7545446
OP_3000 nM PARP1 KO exp5 uid20 3e-04 688 3.477121 659.5625 1.0431157 1.722027 0.6057488
NT PARP1 KO exp6 uid21 3e-04 756 0.000000 559.0000 1.3524150 1.722027 0.7853623
OP_30 nM PARP1 KO exp6 uid22 3e-04 678 1.477121 559.0000 1.2128801 1.722027 0.7043329
OP_300 nM PARP1 KO exp6 uid23 3e-04 655 2.477121 559.0000 1.1717352 1.722027 0.6804396
OP_3000 nM PARP1 KO exp6 uid24 3e-04 545 3.477121 559.0000 0.9749553 1.722027 0.5661673
NT ALC1 KO exp7 uid25 3e-04 1756 0.000000 793.8750 2.2119351 3.042807 0.7269390
OP_30 nM ALC1 KO exp7 uid26 3e-04 896 1.477121 793.8750 1.1286412 3.042807 0.3709211
OP_300 nM ALC1 KO exp7 uid27 3e-04 616 2.477121 793.8750 0.7759408 3.042807 0.2550082
OP_3000 nM ALC1 KO exp7 uid28 3e-04 324 3.477121 793.8750 0.4081247 3.042807 0.1341277
NT ALC1 KO exp8 uid29 3e-04 1540 0.000000 561.1875 2.7441809 3.042807 0.9018584
OP_30 nM ALC1 KO exp8 uid30 3e-04 710 1.477121 561.1875 1.2651743 3.042807 0.4157918
OP_300 nM ALC1 KO exp8 uid31 3e-04 368 2.477121 561.1875 0.6557523 3.042807 0.2155090
OP_3000 nM ALC1 KO exp8 uid32 3e-04 210 3.477121 561.1875 0.3742065 3.042807 0.1229807
NT ALC1 KO exp9 uid33 3e-04 1568 0.000000 645.3125 2.4298305 3.042807 0.7985490
OP_30 nM ALC1 KO exp9 uid34 3e-04 896 1.477121 645.3125 1.3884746 3.042807 0.4563137
OP_300 nM ALC1 KO exp9 uid35 3e-04 669 2.477121 645.3125 1.0367070 3.042807 0.3407075
OP_3000 nM ALC1 KO exp9 uid36 3e-04 114 3.477121 645.3125 0.1766586 3.042807 0.0580578
NT ALC1 KO PARP1 KO exp10 uid37 3e-04 1855 0.000000 1373.9375 1.3501342 1.807476 0.7469723
OP_30 nM ALC1 KO PARP1 KO exp10 uid38 3e-04 1755 1.477121 1373.9375 1.2773507 1.807476 0.7067043
OP_300 nM ALC1 KO PARP1 KO exp10 uid39 3e-04 1641 2.477121 1373.9375 1.1943775 1.807476 0.6607987
OP_3000 nM ALC1 KO PARP1 KO exp10 uid40 3e-04 1555 3.477121 1373.9375 1.1317837 1.807476 0.6261682
NT ALC1 KO PARP1 KO exp11 uid41 3e-04 1489 0.000000 912.3125 1.6321162 1.807476 0.9029811
OP_30 nM ALC1 KO PARP1 KO exp11 uid42 3e-04 1255 1.477121 912.3125 1.3756251 1.807476 0.7610754
OP_300 nM ALC1 KO PARP1 KO exp11 uid43 3e-04 1099 2.477121 912.3125 1.2046311 1.807476 0.6664716
OP_3000 nM ALC1 KO PARP1 KO exp11 uid44 3e-04 958 3.477121 912.3125 1.0500788 1.807476 0.5809643
NT ALC1 KO PARP1 KO exp12 uid45 3e-04 1120 0.000000 750.5625 1.4922142 1.807476 0.8255792
OP_30 nM ALC1 KO PARP1 KO exp12 uid46 3e-04 980 1.477121 750.5625 1.3056874 1.807476 0.7223818
OP_300 nM ALC1 KO PARP1 KO exp12 uid47 3e-04 964 2.477121 750.5625 1.2843701 1.807476 0.7105878
OP_3000 nM ALC1 KO PARP1 KO exp12 uid48 3e-04 922 3.477121 750.5625 1.2284120 1.807476 0.6796286
NT WT exp1 uid1 6e-04 1676 0.000000 1476.7500 1.1349247 1.532591 0.7405267
OP_30 nM WT exp1 uid2 6e-04 1512 1.477121 1476.7500 1.0238700 1.532591 0.6680646
OP_300 nM WT exp1 uid3 6e-04 1232 2.477121 1476.7500 0.8342644 1.532591 0.5443490
OP_3000 nM WT exp1 uid4 6e-04 888 3.477121 1476.7500 0.6013205 1.532591 0.3923554
NT WT exp2 uid5 6e-04 1051 0.000000 827.6875 1.2698029 1.532591 0.8285333
OP_30 nM WT exp2 uid6 6e-04 892 1.477121 827.6875 1.0777014 1.532591 0.7031891
OP_300 nM WT exp2 uid7 6e-04 596 2.477121 827.6875 0.7200785 1.532591 0.4698438
OP_3000 nM WT exp2 uid8 6e-04 432 3.477121 827.6875 0.5219361 1.532591 0.3405579
NT WT exp3 uid9 6e-04 1295 0.000000 1017.4375 1.2728055 1.532591 0.8304925
OP_30 nM WT exp3 uid10 6e-04 1120 1.477121 1017.4375 1.1008047 1.532591 0.7182637
OP_300 nM WT exp3 uid11 6e-04 755 2.477121 1017.4375 0.7420603 1.532591 0.4841867
OP_3000 nM WT exp3 uid12 6e-04 600 3.477121 1017.4375 0.5897168 1.532591 0.3847841
NT PARP1 KO exp4 uid13 6e-04 615 0.000000 606.6250 1.0138059 1.722027 0.5887283
OP_30 nM PARP1 KO exp4 uid14 6e-04 540 1.477121 606.6250 0.8901710 1.722027 0.5169321
OP_300 nM PARP1 KO exp4 uid15 6e-04 522 2.477121 606.6250 0.8604987 1.722027 0.4997011
OP_3000 nM PARP1 KO exp4 uid16 6e-04 477 3.477121 606.6250 0.7863177 1.722027 0.4566234
NT PARP1 KO exp5 uid17 6e-04 677 0.000000 659.5625 1.0264380 1.722027 0.5960639
OP_30 nM PARP1 KO exp5 uid18 6e-04 544 1.477121 659.5625 0.8247892 1.722027 0.4789642
OP_300 nM PARP1 KO exp5 uid19 6e-04 512 2.477121 659.5625 0.7762722 1.722027 0.4507898
OP_3000 nM PARP1 KO exp5 uid20 6e-04 410 3.477121 659.5625 0.6216242 1.722027 0.3609840
NT PARP1 KO exp6 uid21 6e-04 621 0.000000 559.0000 1.1109123 1.722027 0.6451191
OP_30 nM PARP1 KO exp6 uid22 6e-04 554 1.477121 559.0000 0.9910555 1.722027 0.5755168
OP_300 nM PARP1 KO exp6 uid23 6e-04 468 2.477121 559.0000 0.8372093 1.722027 0.4861767
OP_3000 nM PARP1 KO exp6 uid24 6e-04 365 3.477121 559.0000 0.6529517 1.722027 0.3791763
NT ALC1 KO exp7 uid25 6e-04 1396 0.000000 793.8750 1.7584632 3.042807 0.5779083
OP_30 nM ALC1 KO exp7 uid26 6e-04 740 1.477121 793.8750 0.9321367 3.042807 0.3063411
OP_300 nM ALC1 KO exp7 uid27 6e-04 441 2.477121 793.8750 0.5555031 3.042807 0.1825627
OP_3000 nM ALC1 KO exp7 uid28 6e-04 112 3.477121 793.8750 0.1410801 3.042807 0.0463651
NT ALC1 KO exp8 uid29 6e-04 966 0.000000 561.1875 1.7213498 3.042807 0.5657112
OP_30 nM ALC1 KO exp8 uid30 6e-04 450 1.477121 561.1875 0.8018710 3.042807 0.2635300
OP_300 nM ALC1 KO exp8 uid31 6e-04 320 2.477121 561.1875 0.5702194 3.042807 0.1873991
OP_3000 nM ALC1 KO exp8 uid32 6e-04 102 3.477121 561.1875 0.1817574 3.042807 0.0597335
NT ALC1 KO exp9 uid33 6e-04 999 0.000000 645.3125 1.5480872 3.042807 0.5087694
OP_30 nM ALC1 KO exp9 uid34 6e-04 620 1.477121 645.3125 0.9607748 3.042807 0.3157528
OP_300 nM ALC1 KO exp9 uid35 6e-04 410 2.477121 645.3125 0.6353511 3.042807 0.2088043
OP_3000 nM ALC1 KO exp9 uid36 6e-04 95 3.477121 645.3125 0.1472155 3.042807 0.0483815
NT ALC1 KO PARP1 KO exp10 uid37 6e-04 1355 0.000000 1373.9375 0.9862166 1.807476 0.5456321
OP_30 nM ALC1 KO PARP1 KO exp10 uid38 6e-04 1080 1.477121 1373.9375 0.7860620 1.807476 0.4348949
OP_300 nM ALC1 KO PARP1 KO exp10 uid39 6e-04 850 2.477121 1373.9375 0.6186599 1.807476 0.3422784
OP_3000 nM ALC1 KO PARP1 KO exp10 uid40 6e-04 742 3.477121 1373.9375 0.5400537 1.807476 0.2987889
NT ALC1 KO PARP1 KO exp11 uid41 6e-04 1023 0.000000 912.3125 1.1213263 1.807476 0.6203826
OP_30 nM ALC1 KO PARP1 KO exp11 uid42 6e-04 741 1.477121 912.3125 0.8122217 1.807476 0.4493680
OP_300 nM ALC1 KO PARP1 KO exp11 uid43 6e-04 612 2.477121 912.3125 0.6708228 1.807476 0.3711379
OP_3000 nM ALC1 KO PARP1 KO exp11 uid44 6e-04 588 3.477121 912.3125 0.6445160 1.807476 0.3565835
NT ALC1 KO PARP1 KO exp12 uid45 6e-04 785 0.000000 750.5625 1.0458823 1.807476 0.5786425
OP_30 nM ALC1 KO PARP1 KO exp12 uid46 6e-04 536 1.477121 750.5625 0.7141311 1.807476 0.3950986
OP_300 nM ALC1 KO PARP1 KO exp12 uid47 6e-04 488 2.477121 750.5625 0.6501790 1.807476 0.3597166
OP_3000 nM ALC1 KO PARP1 KO exp12 uid48 6e-04 399 3.477121 750.5625 0.5316013 1.807476 0.2941126
NT WT exp1 uid1 1e-03 1422 0.000000 1476.7500 0.9629253 1.532591 0.6282989
OP_30 nM WT exp1 uid2 1e-03 1228 1.477121 1476.7500 0.8315558 1.532591 0.5425816
OP_300 nM WT exp1 uid3 1e-03 1044 2.477121 1476.7500 0.7069578 1.532591 0.4612827
OP_3000 nM WT exp1 uid4 1e-03 568 3.477121 1476.7500 0.3846284 1.532591 0.2509661
NT WT exp2 uid5 1e-03 920 0.000000 827.6875 1.1115306 1.532591 0.7252623
OP_30 nM WT exp2 uid6 1e-03 696 1.477121 827.6875 0.8408971 1.532591 0.5486767
OP_300 nM WT exp2 uid7 1e-03 425 2.477121 827.6875 0.5134788 1.532591 0.3350396
OP_3000 nM WT exp2 uid8 1e-03 245 3.477121 827.6875 0.2960054 1.532591 0.1931405
NT WT exp3 uid9 1e-03 1121 0.000000 1017.4375 1.1017876 1.532591 0.7189051
OP_30 nM WT exp3 uid10 1e-03 838 1.477121 1017.4375 0.8236378 1.532591 0.5374152
OP_300 nM WT exp3 uid11 1e-03 488 2.477121 1017.4375 0.4796363 1.532591 0.3129578
OP_3000 nM WT exp3 uid12 1e-03 385 3.477121 1017.4375 0.3784016 1.532591 0.2469032
NT PARP1 KO exp4 uid13 1e-03 388 0.000000 606.6250 0.6396044 1.722027 0.3714253
OP_30 nM PARP1 KO exp4 uid14 1e-03 324 1.477121 606.6250 0.5341026 1.722027 0.3101593
OP_300 nM PARP1 KO exp4 uid15 1e-03 244 2.477121 606.6250 0.4022254 1.722027 0.2335767
OP_3000 nM PARP1 KO exp4 uid16 1e-03 212 3.477121 606.6250 0.3494746 1.722027 0.2029437
NT PARP1 KO exp5 uid17 1e-03 422 0.000000 659.5625 0.6398181 1.722027 0.3715494
OP_30 nM PARP1 KO exp5 uid18 1e-03 398 1.477121 659.5625 0.6034303 1.722027 0.3504186
OP_300 nM PARP1 KO exp5 uid19 1e-03 212 2.477121 659.5625 0.3214252 1.722027 0.1866552
OP_3000 nM PARP1 KO exp5 uid20 1e-03 156 3.477121 659.5625 0.2365204 1.722027 0.1373500
NT PARP1 KO exp6 uid21 1e-03 328 0.000000 559.0000 0.5867621 1.722027 0.3407392
OP_30 nM PARP1 KO exp6 uid22 1e-03 222 1.477121 559.0000 0.3971377 1.722027 0.2306223
OP_300 nM PARP1 KO exp6 uid23 1e-03 128 2.477121 559.0000 0.2289803 1.722027 0.1329714
OP_3000 nM PARP1 KO exp6 uid24 1e-03 120 3.477121 559.0000 0.2146691 1.722027 0.1246607
NT ALC1 KO exp7 uid25 1e-03 700 0.000000 793.8750 0.8817509 3.042807 0.2897821
OP_30 nM ALC1 KO exp7 uid26 1e-03 121 1.477121 793.8750 0.1524169 3.042807 0.0500909
OP_300 nM ALC1 KO exp7 uid27 1e-03 101 2.477121 793.8750 0.1272241 3.042807 0.0418114
OP_3000 nM ALC1 KO exp7 uid28 1e-03 38 3.477121 793.8750 0.0478665 3.042807 0.0157310
NT ALC1 KO exp8 uid29 1e-03 588 0.000000 561.1875 1.0477781 3.042807 0.3443459
OP_30 nM ALC1 KO exp8 uid30 1e-03 120 1.477121 561.1875 0.2138323 3.042807 0.0702747
OP_300 nM ALC1 KO exp8 uid31 1e-03 77 2.477121 561.1875 0.1372090 3.042807 0.0450929
OP_3000 nM ALC1 KO exp8 uid32 1e-03 62 3.477121 561.1875 0.1104800 3.042807 0.0363086
NT ALC1 KO exp9 uid33 1e-03 652 0.000000 645.3125 1.0103632 3.042807 0.3320497
OP_30 nM ALC1 KO exp9 uid34 1e-03 210 1.477121 645.3125 0.3254237 3.042807 0.1069485
OP_300 nM ALC1 KO exp9 uid35 1e-03 141 2.477121 645.3125 0.2184988 3.042807 0.0718083
OP_3000 nM ALC1 KO exp9 uid36 1e-03 40 3.477121 645.3125 0.0619855 3.042807 0.0203711
NT ALC1 KO PARP1 KO exp10 uid37 1e-03 751 0.000000 1373.9375 0.5466042 1.807476 0.3024130
OP_30 nM ALC1 KO PARP1 KO exp10 uid38 1e-03 422 1.477121 1373.9375 0.3071464 1.807476 0.1699312
OP_300 nM ALC1 KO PARP1 KO exp10 uid39 1e-03 355 2.477121 1373.9375 0.2583815 1.807476 0.1429516
OP_3000 nM ALC1 KO PARP1 KO exp10 uid40 1e-03 288 3.477121 1373.9375 0.2096165 1.807476 0.1159720
NT ALC1 KO PARP1 KO exp11 uid41 1e-03 612 0.000000 912.3125 0.6708228 1.807476 0.3711379
OP_30 nM ALC1 KO PARP1 KO exp11 uid42 1e-03 355 1.477121 912.3125 0.3891211 1.807476 0.2152843
OP_300 nM ALC1 KO PARP1 KO exp11 uid43 1e-03 355 2.477121 912.3125 0.3891211 1.807476 0.2152843
OP_3000 nM ALC1 KO PARP1 KO exp11 uid44 1e-03 244 3.477121 912.3125 0.2674522 1.807476 0.1479700
NT ALC1 KO PARP1 KO exp12 uid45 1e-03 433 0.000000 750.5625 0.5769007 1.807476 0.3191748
OP_30 nM ALC1 KO PARP1 KO exp12 uid46 1e-03 328 1.477121 750.5625 0.4370056 1.807476 0.2417768
OP_300 nM ALC1 KO PARP1 KO exp12 uid47 1e-03 299 2.477121 750.5625 0.3983679 1.807476 0.2204002
OP_3000 nM ALC1 KO PARP1 KO exp12 uid48 1e-03 288 3.477121 750.5625 0.3837122 1.807476 0.2122918

Plot Data

library(ggplot2)

# raw data
ggplot(dataset, aes(x=MMS, y=Counts, color=Treatment)) + 
        theme_bw() +
        theme(panel.grid=element_blank(), text = element_text(size=14)) +
        geom_smooth(method=lm, formula = y ~ poly(x,2), se=FALSE) +
        geom_point(aes(colour=Treatment, shape=Experiment), size=2) +        
        facet_grid(. ~ genotype) +
        xlab(label = "MMS (%)") +
        scale_shape_manual(values=1:19) +
        scale_color_manual(values=c('#000000','#EE0000','#0000EE','#888888'))

# NormCounts Linear
ggplot(dataset, aes(x=MMS, y=NormCounts, color=Treatment)) + 
        theme_bw() +
        theme(panel.grid=element_blank(), text = element_text(size=14)) +
        geom_smooth(method=lm, formula = y ~ x, se=FALSE) +
        geom_point(aes(colour=Treatment), size=2) +        
        facet_grid(. ~ genotype) +
        xlab(label = "MMS (%)") +
        scale_color_manual(values=c('#000000','#EE0000','#0000EE','#888888'))

# NormCounts2 Linear
ggplot(dataset, aes(x=MMS, y=NormCounts2, color=Treatment)) + 
        theme_bw() +
        theme(panel.grid=element_blank(), text = element_text(size=14)) +
        geom_smooth(method=lm, formula = y ~ x, se=FALSE) +
        geom_point(aes(colour=Treatment), size=2) +        
        facet_grid(. ~ genotype) +
        xlab(label = "MMS (%)") +
        scale_color_manual(values=c('#000000','#EE0000','#0000EE','#888888'))

# NormCounts Quadratic
ggplot(dataset, aes(x=MMS, y=NormCounts, color=Treatment)) + 
        theme_bw() +
        theme(panel.grid=element_blank(), text = element_text(size=14)) +
        geom_smooth(method=lm, formula = y ~ poly(x,2), se=FALSE) +
        geom_point(aes(colour=Treatment), size=2) +        
        facet_grid(. ~ genotype) +
        xlab(label = "MMS (%)") +
        scale_color_manual(values=c('#000000','#EE0000','#0000EE','#888888'))

# NormCounts2 Quadratic
ggplot(dataset, aes(x=MMS, y=NormCounts2, color=Treatment)) + 
        theme_bw() +
        theme(panel.grid=element_blank(), text = element_text(size=14)) +
        geom_smooth(method=lm, formula = y ~ poly(x,2), se=FALSE) +
        geom_point(aes(colour=Treatment), size=2) +        
        facet_grid(. ~ genotype) +
        xlab(label = "MMS (%)") +
        scale_color_manual(values=c('#000000','#EE0000','#0000EE','#888888'))

# NormCounts Cubic
ggplot(dataset, aes(x=MMS, y=NormCounts, color=Treatment)) + 
        theme_bw() +
        theme(panel.grid=element_blank(), text = element_text(size=14)) +
        geom_smooth(method=lm, formula = y ~ poly(x,2), se=FALSE) +
        geom_point(aes(colour=Treatment), size=2) +        
        facet_grid(. ~ genotype) +
        xlab(label = "MMS (%)") +
        scale_color_manual(values=c('#000000','#EE0000','#0000EE','#888888'))

# NormCounts2 Cubic
ggplot(dataset, aes(x=MMS, y=NormCounts2, color=Treatment)) + 
        theme_bw() +
        theme(panel.grid=element_blank(), text = element_text(size=14)) +
        geom_smooth(method=lm, formula = y ~ poly(x,2), se=FALSE) +
        geom_point(aes(colour=Treatment), size=2) +        
        facet_grid(. ~ genotype) +
        xlab(label = "MMS (%)") +
        scale_color_manual(values=c('#000000','#EE0000','#0000EE','#888888'))

cairo_pdf("Figure3B.pdf", width = 10, height = 4, family = "Arial")
datasubset <- dataset[dataset$genotype %in% levels(dataset$genotype),]
datasubset$genotype <- relevel(datasubset$genotype, ref = "WT")

ggplot(datasubset, aes(x=MMS, y=NormCounts2, color=Treatment)) + 
        theme_bw() +
        theme(panel.grid=element_blank(), text = element_text(size=14), axis.text.x = element_text(angle = 90, hjust = 1)) +
        geom_point(aes(colour = Treatment)) +
        geom_smooth(method=lm, formula = y ~ poly(x,2), se=TRUE, fill='#DDDDDD', size=0.5) +
        facet_grid(. ~ genotype) +
        xlab(label = "MMS (%)") +
        ylab(label = "Normalized Counts") +
        scale_x_continuous(labels = function(x) format(x, scientific = TRUE)) +
        scale_color_manual(values=c('#000000','#EE0000','#0000EE','#888888'))

dev.off()
## quartz_off_screen 
##                 2

Models

library(MASS)
library(DHARMa)
library(lme4)
library(lmerTest)
library(bbmle)

Linear formula

fit1 <- lm(Counts ~ MMS*Olaparib*genotype, data = dataset)
print(summary(fit1))
## 
## Call:
## lm(formula = Counts ~ MMS * Olaparib * genotype, data = dataset)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -531.63 -140.29  -14.33   72.49  801.64 
## 
## Coefficients:
##                                          Estimate Std. Error t value Pr(>|t|)
## (Intercept)                               1755.63     103.93  16.893  < 2e-16
## MMS                                    -580310.59  172614.81  -3.362 0.000950
## Olaparib                                  -182.98      46.01  -3.977 0.000102
## genotypeALC1 KO                            225.50     146.98   1.534 0.126765
## genotypeALC1 KO PARP1 KO                    90.02     146.98   0.612 0.540998
## genotypePARP1 KO                          -688.65     146.98  -4.685 5.57e-06
## MMS:Olaparib                            -37105.43   76419.41  -0.486 0.627890
## MMS:genotypeALC1 KO                    -863845.73  244114.21  -3.539 0.000514
## MMS:genotypeALC1 KO PARP1 KO           -718146.86  244114.21  -2.942 0.003702
## MMS:genotypePARP1 KO                   -113007.47  244114.21  -0.463 0.643987
## Olaparib:genotypeALC1 KO                  -311.91      65.07  -4.794 3.47e-06
## Olaparib:genotypeALC1 KO PARP1 KO           51.66      65.07   0.794 0.428313
## Olaparib:genotypePARP1 KO                  103.05      65.07   1.584 0.115059
## MMS:Olaparib:genotypeALC1 KO            366939.29  108073.37   3.395 0.000847
## MMS:Olaparib:genotypeALC1 KO PARP1 KO    68105.75  108073.37   0.630 0.529394
## MMS:Olaparib:genotypePARP1 KO            58904.08  108073.37   0.545 0.586417
##                                           
## (Intercept)                            ***
## MMS                                    ***
## Olaparib                               ***
## genotypeALC1 KO                           
## genotypeALC1 KO PARP1 KO                  
## genotypePARP1 KO                       ***
## MMS:Olaparib                              
## MMS:genotypeALC1 KO                    ***
## MMS:genotypeALC1 KO PARP1 KO           ** 
## MMS:genotypePARP1 KO                      
## Olaparib:genotypeALC1 KO               ***
## Olaparib:genotypeALC1 KO PARP1 KO         
## Olaparib:genotypePARP1 KO                 
## MMS:Olaparib:genotypeALC1 KO           ***
## MMS:Olaparib:genotypeALC1 KO PARP1 KO     
## MMS:Olaparib:genotypePARP1 KO             
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 251.7 on 176 degrees of freedom
## Multiple R-squared:  0.7979, Adjusted R-squared:  0.7807 
## F-statistic: 46.32 on 15 and 176 DF,  p-value: < 2.2e-16
cat("AIC: ", AIC(fit1))
## AIC:  2684.934
simres <- simulateResiduals(fittedModel = fit1)
plot(simres)

fit2 <- lm(NormCounts ~ MMS*Olaparib*genotype, data = dataset)
print(summary(fit2))
## 
## Call:
## lm(formula = NormCounts ~ MMS * Olaparib * genotype, data = dataset)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.45887 -0.07451  0.00108  0.06737  0.57816 
## 
## Coefficients:
##                                          Estimate Std. Error t value Pr(>|t|)
## (Intercept)                             1.584e+00  5.444e-02  29.098  < 2e-16
## MMS                                    -5.061e+02  9.042e+01  -5.597 8.25e-08
## Olaparib                               -1.630e-01  2.410e-02  -6.761 1.95e-10
## genotypeALC1 KO                         1.388e+00  7.699e-02  18.028  < 2e-16
## genotypeALC1 KO PARP1 KO                2.477e-01  7.699e-02   3.218  0.00154
## genotypePARP1 KO                        1.713e-01  7.699e-02   2.224  0.02740
## MMS:Olaparib                           -4.655e+01  4.003e+01  -1.163  0.24644
## MMS:genotypeALC1 KO                    -1.652e+03  1.279e+02 -12.916  < 2e-16
## MMS:genotypeALC1 KO PARP1 KO           -7.766e+02  1.279e+02  -6.073 7.54e-09
## MMS:genotypePARP1 KO                   -6.373e+02  1.279e+02  -4.984 1.48e-06
## Olaparib:genotypeALC1 KO               -5.829e-01  3.409e-02 -17.100  < 2e-16
## Olaparib:genotypeALC1 KO PARP1 KO       2.004e-02  3.409e-02   0.588  0.55726
## Olaparib:genotypePARP1 KO               3.157e-02  3.409e-02   0.926  0.35560
## MMS:Olaparib:genotypeALC1 KO            5.432e+02  5.661e+01   9.595  < 2e-16
## MMS:Olaparib:genotypeALC1 KO PARP1 KO   9.510e+01  5.661e+01   1.680  0.09478
## MMS:Olaparib:genotypePARP1 KO           8.249e+01  5.661e+01   1.457  0.14687
##                                           
## (Intercept)                            ***
## MMS                                    ***
## Olaparib                               ***
## genotypeALC1 KO                        ***
## genotypeALC1 KO PARP1 KO               ** 
## genotypePARP1 KO                       *  
## MMS:Olaparib                              
## MMS:genotypeALC1 KO                    ***
## MMS:genotypeALC1 KO PARP1 KO           ***
## MMS:genotypePARP1 KO                   ***
## Olaparib:genotypeALC1 KO               ***
## Olaparib:genotypeALC1 KO PARP1 KO         
## Olaparib:genotypePARP1 KO                 
## MMS:Olaparib:genotypeALC1 KO           ***
## MMS:Olaparib:genotypeALC1 KO PARP1 KO  .  
## MMS:Olaparib:genotypePARP1 KO             
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1318 on 176 degrees of freedom
## Multiple R-squared:  0.9495, Adjusted R-squared:  0.9452 
## F-statistic: 220.6 on 15 and 176 DF,  p-value: < 2.2e-16
cat("AIC: ", AIC(fit2))
## AIC:  -215.9174
simres <- simulateResiduals(fittedModel = fit2)
plot(simres)

fit3 <- lm(NormCounts2 ~ MMS*Olaparib*genotype, data = dataset)
print(summary(fit3))
## 
## Call:
## lm(formula = NormCounts2 ~ MMS * Olaparib * genotype, data = dataset)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.179482 -0.038679  0.000384  0.036186  0.190008 
## 
## Coefficients:
##                                          Estimate Std. Error t value Pr(>|t|)
## (Intercept)                               1.03368    0.02504  41.285  < 2e-16
## MMS                                    -330.20788   41.58514  -7.941 2.29e-13
## Olaparib                                 -0.10632    0.01108  -9.592  < 2e-16
## genotypeALC1 KO                          -0.05686    0.03541  -1.606   0.1101
## genotypeALC1 KO PARP1 KO                 -0.02015    0.03541  -0.569   0.5701
## genotypePARP1 KO                         -0.01426    0.03541  -0.403   0.6877
## MMS:Olaparib                            -30.37600   18.41042  -1.650   0.1007
## MMS:genotypeALC1 KO                    -378.93319   58.81027  -6.443 1.08e-09
## MMS:genotypeALC1 KO PARP1 KO           -379.44662   58.81027  -6.452 1.03e-09
## MMS:genotypePARP1 KO                   -333.75987   58.81027  -5.675 5.61e-08
## Olaparib:genotypeALC1 KO                 -0.13878    0.01568  -8.853 8.94e-16
## Olaparib:genotypeALC1 KO PARP1 KO         0.02726    0.01568   1.739   0.0838
## Olaparib:genotypePARP1 KO                 0.03003    0.01568   1.916   0.0570
## MMS:Olaparib:genotypeALC1 KO            193.60495   26.03627   7.436 4.37e-12
## MMS:Olaparib:genotypeALC1 KO PARP1 KO    57.23286   26.03627   2.198   0.0292
## MMS:Olaparib:genotypePARP1 KO            51.24607   26.03627   1.968   0.0506
##                                           
## (Intercept)                            ***
## MMS                                    ***
## Olaparib                               ***
## genotypeALC1 KO                           
## genotypeALC1 KO PARP1 KO                  
## genotypePARP1 KO                          
## MMS:Olaparib                              
## MMS:genotypeALC1 KO                    ***
## MMS:genotypeALC1 KO PARP1 KO           ***
## MMS:genotypePARP1 KO                   ***
## Olaparib:genotypeALC1 KO               ***
## Olaparib:genotypeALC1 KO PARP1 KO      .  
## Olaparib:genotypePARP1 KO              .  
## MMS:Olaparib:genotypeALC1 KO           ***
## MMS:Olaparib:genotypeALC1 KO PARP1 KO  *  
## MMS:Olaparib:genotypePARP1 KO          .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.06063 on 176 degrees of freedom
## Multiple R-squared:  0.9578, Adjusted R-squared:  0.9542 
## F-statistic: 266.6 on 15 and 176 DF,  p-value: < 2.2e-16
cat("AIC: ", AIC(fit3))
## AIC:  -514.1992
simres <- simulateResiduals(fittedModel = fit3)
plot(simres)

fit4 <- lmer(Counts ~ MMS*Olaparib*genotype + (1|UID), data = dataset)
print(summary(fit4))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ MMS * Olaparib * genotype + (1 | UID)
##    Data: dataset
## 
## REML criterion at convergence: 2285.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.2898 -0.3944 -0.0059  0.3584  3.9273 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  UID      (Intercept) 45843    214.1   
##  Residual             21652    147.1   
## Number of obs: 192, groups:  UID, 48
## 
## Fixed effects:
##                                          Estimate Std. Error         df t value
## (Intercept)                               1755.63     124.51      54.65  14.101
## MMS                                    -580310.59  100932.46     136.00  -5.749
## Olaparib                                  -182.98      55.12      54.65  -3.320
## genotypeALC1 KO                            225.50     176.08      54.65   1.281
## genotypeALC1 KO PARP1 KO                    90.02     176.08      54.65   0.511
## genotypePARP1 KO                          -688.65     176.08      54.65  -3.911
## MMS:Olaparib                            -37105.43   44684.46     136.00  -0.830
## MMS:genotypeALC1 KO                    -863845.73  142740.05     136.00  -6.052
## MMS:genotypeALC1 KO PARP1 KO           -718146.86  142740.05     136.00  -5.031
## MMS:genotypePARP1 KO                   -113007.47  142740.05     136.00  -0.792
## Olaparib:genotypeALC1 KO                  -311.91      77.95      54.65  -4.001
## Olaparib:genotypeALC1 KO PARP1 KO           51.66      77.95      54.65   0.663
## Olaparib:genotypePARP1 KO                  103.05      77.95      54.65   1.322
## MMS:Olaparib:genotypeALC1 KO            366939.29   63193.36     136.00   5.807
## MMS:Olaparib:genotypeALC1 KO PARP1 KO    68105.75   63193.36     136.00   1.078
## MMS:Olaparib:genotypePARP1 KO            58904.08   63193.36     136.00   0.932
##                                        Pr(>|t|)    
## (Intercept)                             < 2e-16 ***
## MMS                                    5.64e-08 ***
## Olaparib                               0.001610 ** 
## genotypeALC1 KO                        0.205725    
## genotypeALC1 KO PARP1 KO               0.611228    
## genotypePARP1 KO                       0.000256 ***
## MMS:Olaparib                           0.407775    
## MMS:genotypeALC1 KO                    1.31e-08 ***
## MMS:genotypeALC1 KO PARP1 KO           1.51e-06 ***
## MMS:genotypePARP1 KO                   0.429914    
## Olaparib:genotypeALC1 KO               0.000191 ***
## Olaparib:genotypeALC1 KO PARP1 KO      0.510314    
## Olaparib:genotypePARP1 KO              0.191699    
## MMS:Olaparib:genotypeALC1 KO           4.29e-08 ***
## MMS:Olaparib:genotypeALC1 KO PARP1 KO  0.283060    
## MMS:Olaparib:genotypePARP1 KO          0.352924    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## fit warnings:
## Some predictor variables are on very different scales: consider rescaling
cat("AIC: ", AIC(fit4))
## AIC:  2321.885
simres <- simulateResiduals(fittedModel = fit4)
plot(simres)

Quadratic formula

fit5 <- lm(Counts ~ poly(MMS,2)*poly(Olaparib,2)*genotype, data = dataset)
print(summary(fit5))
## 
## Call:
## lm(formula = Counts ~ poly(MMS, 2) * poly(Olaparib, 2) * genotype, 
##     data = dataset)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -565.74 -108.66  -13.36   66.81  798.36 
## 
## Coefficients:
##                                                            Estimate Std. Error
## (Intercept)                                                 1107.29      37.88
## poly(MMS, 2)1                                              -3328.30     524.92
## poly(MMS, 2)2                                                205.29     524.92
## poly(Olaparib, 2)1                                         -3571.07     524.92
## poly(Olaparib, 2)2                                          -652.71     524.92
## genotypeALC1 KO                                             -440.50      53.57
## genotypeALC1 KO PARP1 KO                                     -95.02      53.57
## genotypePARP1 KO                                            -498.90      53.57
## poly(MMS, 2)1:poly(Olaparib, 2)1                           -3386.19    7273.48
## poly(MMS, 2)2:poly(Olaparib, 2)1                             294.71    7273.48
## poly(MMS, 2)1:poly(Olaparib, 2)2                            2542.16    7273.48
## poly(MMS, 2)2:poly(Olaparib, 2)2                           -1386.81    7273.48
## poly(MMS, 2)1:genotypeALC1 KO                               -933.68     742.35
## poly(MMS, 2)2:genotypeALC1 KO                                -98.66     742.35
## poly(MMS, 2)1:genotypeALC1 KO PARP1 KO                     -3032.87     742.35
## poly(MMS, 2)2:genotypeALC1 KO PARP1 KO                        10.71     742.35
## poly(MMS, 2)1:genotypePARP1 KO                               -18.32     742.35
## poly(MMS, 2)2:genotypePARP1 KO                              -273.72     742.35
## poly(Olaparib, 2)1:genotypeALC1 KO                         -2449.82     742.35
## poly(Olaparib, 2)2:genotypeALC1 KO                          1490.78     742.35
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO                 1495.51     742.35
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO                  833.05     742.35
## poly(Olaparib, 2)1:genotypePARP1 KO                         2332.53     742.35
## poly(Olaparib, 2)2:genotypePARP1 KO                          421.59     742.35
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO           33486.40   10286.26
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO           -1021.01   10286.26
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO            -498.63   10286.26
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO            3943.39   10286.26
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO   6215.24   10286.26
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO    572.82   10286.26
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO   1285.62   10286.26
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO    -34.31   10286.26
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypePARP1 KO           5375.51   10286.26
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypePARP1 KO          -3068.70   10286.26
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypePARP1 KO            201.69   10286.26
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypePARP1 KO            245.28   10286.26
##                                                            t value Pr(>|t|)    
## (Intercept)                                                 29.229  < 2e-16 ***
## poly(MMS, 2)1                                               -6.341 2.35e-09 ***
## poly(MMS, 2)2                                                0.391  0.69626    
## poly(Olaparib, 2)1                                          -6.803 2.07e-10 ***
## poly(Olaparib, 2)2                                          -1.243  0.21557    
## genotypeALC1 KO                                             -8.222 7.29e-14 ***
## genotypeALC1 KO PARP1 KO                                    -1.774  0.07808 .  
## genotypePARP1 KO                                            -9.312  < 2e-16 ***
## poly(MMS, 2)1:poly(Olaparib, 2)1                            -0.466  0.64218    
## poly(MMS, 2)2:poly(Olaparib, 2)1                             0.041  0.96773    
## poly(MMS, 2)1:poly(Olaparib, 2)2                             0.350  0.72718    
## poly(MMS, 2)2:poly(Olaparib, 2)2                            -0.191  0.84903    
## poly(MMS, 2)1:genotypeALC1 KO                               -1.258  0.21037    
## poly(MMS, 2)2:genotypeALC1 KO                               -0.133  0.89444    
## poly(MMS, 2)1:genotypeALC1 KO PARP1 KO                      -4.086 7.01e-05 ***
## poly(MMS, 2)2:genotypeALC1 KO PARP1 KO                       0.014  0.98851    
## poly(MMS, 2)1:genotypePARP1 KO                              -0.025  0.98035    
## poly(MMS, 2)2:genotypePARP1 KO                              -0.369  0.71283    
## poly(Olaparib, 2)1:genotypeALC1 KO                          -3.300  0.00120 ** 
## poly(Olaparib, 2)2:genotypeALC1 KO                           2.008  0.04635 *  
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO                  2.015  0.04567 *  
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO                  1.122  0.26351    
## poly(Olaparib, 2)1:genotypePARP1 KO                          3.142  0.00201 ** 
## poly(Olaparib, 2)2:genotypePARP1 KO                          0.568  0.57091    
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO             3.255  0.00139 ** 
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO            -0.099  0.92106    
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO            -0.048  0.96140    
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO             0.383  0.70197    
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO    0.604  0.54657    
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO    0.056  0.95566    
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO    0.125  0.90070    
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO   -0.003  0.99734    
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypePARP1 KO            0.523  0.60200    
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypePARP1 KO           -0.298  0.76585    
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypePARP1 KO            0.020  0.98438    
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypePARP1 KO            0.024  0.98101    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 262.5 on 156 degrees of freedom
## Multiple R-squared:  0.8051, Adjusted R-squared:  0.7614 
## F-statistic: 18.42 on 35 and 156 DF,  p-value: < 2.2e-16
cat("AIC: ", AIC(fit5))
## AIC:  2717.922
simres <- simulateResiduals(fittedModel = fit5)
plot(simres)

fit6 <- lm(NormCounts ~ poly(MMS,2)*poly(Olaparib,2)*genotype, data = dataset)
print(summary(fit6))
## 
## Call:
## lm(formula = NormCounts ~ poly(MMS, 2) * poly(Olaparib, 2) * 
##     genotype, data = dataset)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.33727 -0.06003  0.00501  0.05045  0.69976 
## 
## Coefficients:
##                                                              Estimate
## (Intercept)                                                 1.000e+00
## poly(MMS, 2)1                                              -3.038e+00
## poly(MMS, 2)2                                               1.925e-01
## poly(Olaparib, 2)1                                         -3.294e+00
## poly(Olaparib, 2)2                                         -5.470e-01
## genotypeALC1 KO                                             2.773e-16
## genotypeALC1 KO PARP1 KO                                   -2.066e-17
## genotypePARP1 KO                                            3.446e-17
## poly(MMS, 2)1:poly(Olaparib, 2)1                           -4.248e+00
## poly(MMS, 2)2:poly(Olaparib, 2)1                            9.019e-01
## poly(MMS, 2)1:poly(Olaparib, 2)2                            2.517e+00
## poly(MMS, 2)2:poly(Olaparib, 2)2                           -9.963e-01
## poly(MMS, 2)1:genotypeALC1 KO                              -3.294e+00
## poly(MMS, 2)2:genotypeALC1 KO                              -7.475e-02
## poly(MMS, 2)1:genotypeALC1 KO PARP1 KO                     -3.076e+00
## poly(MMS, 2)2:genotypeALC1 KO PARP1 KO                     -7.290e-02
## poly(MMS, 2)1:genotypePARP1 KO                             -2.481e+00
## poly(MMS, 2)2:genotypePARP1 KO                             -3.025e-01
## poly(Olaparib, 2)1:genotypeALC1 KO                         -5.783e+00
## poly(Olaparib, 2)2:genotypeALC1 KO                          1.898e+00
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO                 1.161e+00
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO                 7.599e-01
## poly(Olaparib, 2)1:genotypePARP1 KO                         1.260e+00
## poly(Olaparib, 2)2:genotypePARP1 KO                         1.645e-01
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO            4.957e+01
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO           -1.743e+00
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO           -7.012e-01
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO            5.733e+00
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO   8.678e+00
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO  -6.005e-01
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO   8.786e-01
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO  -5.600e-01
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypePARP1 KO           7.528e+00
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypePARP1 KO          -5.409e+00
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypePARP1 KO           2.216e+00
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypePARP1 KO          -8.950e-01
##                                                            Std. Error t value
## (Intercept)                                                 1.767e-02  56.605
## poly(MMS, 2)1                                               2.448e-01 -12.410
## poly(MMS, 2)2                                               2.448e-01   0.786
## poly(Olaparib, 2)1                                          2.448e-01 -13.458
## poly(Olaparib, 2)2                                          2.448e-01  -2.235
## genotypeALC1 KO                                             2.498e-02   0.000
## genotypeALC1 KO PARP1 KO                                    2.498e-02   0.000
## genotypePARP1 KO                                            2.498e-02   0.000
## poly(MMS, 2)1:poly(Olaparib, 2)1                            3.392e+00  -1.253
## poly(MMS, 2)2:poly(Olaparib, 2)1                            3.392e+00   0.266
## poly(MMS, 2)1:poly(Olaparib, 2)2                            3.392e+00   0.742
## poly(MMS, 2)2:poly(Olaparib, 2)2                            3.392e+00  -0.294
## poly(MMS, 2)1:genotypeALC1 KO                               3.462e-01  -9.514
## poly(MMS, 2)2:genotypeALC1 KO                               3.462e-01  -0.216
## poly(MMS, 2)1:genotypeALC1 KO PARP1 KO                      3.462e-01  -8.884
## poly(MMS, 2)2:genotypeALC1 KO PARP1 KO                      3.462e-01  -0.211
## poly(MMS, 2)1:genotypePARP1 KO                              3.462e-01  -7.168
## poly(MMS, 2)2:genotypePARP1 KO                              3.462e-01  -0.874
## poly(Olaparib, 2)1:genotypeALC1 KO                          3.462e-01 -16.704
## poly(Olaparib, 2)2:genotypeALC1 KO                          3.462e-01   5.482
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO                 3.462e-01   3.354
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO                 3.462e-01   2.195
## poly(Olaparib, 2)1:genotypePARP1 KO                         3.462e-01   3.638
## poly(Olaparib, 2)2:genotypePARP1 KO                         3.462e-01   0.475
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO            4.797e+00  10.335
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO            4.797e+00  -0.363
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO            4.797e+00  -0.146
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO            4.797e+00   1.195
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO   4.797e+00   1.809
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO   4.797e+00  -0.125
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO   4.797e+00   0.183
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO   4.797e+00  -0.117
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypePARP1 KO           4.797e+00   1.569
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypePARP1 KO           4.797e+00  -1.128
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypePARP1 KO           4.797e+00   0.462
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypePARP1 KO           4.797e+00  -0.187
##                                                            Pr(>|t|)    
## (Intercept)                                                 < 2e-16 ***
## poly(MMS, 2)1                                               < 2e-16 ***
## poly(MMS, 2)2                                              0.432903    
## poly(Olaparib, 2)1                                          < 2e-16 ***
## poly(Olaparib, 2)2                                         0.026854 *  
## genotypeALC1 KO                                            1.000000    
## genotypeALC1 KO PARP1 KO                                   1.000000    
## genotypePARP1 KO                                           1.000000    
## poly(MMS, 2)1:poly(Olaparib, 2)1                           0.212251    
## poly(MMS, 2)2:poly(Olaparib, 2)1                           0.790662    
## poly(MMS, 2)1:poly(Olaparib, 2)2                           0.459135    
## poly(MMS, 2)2:poly(Olaparib, 2)2                           0.769362    
## poly(MMS, 2)1:genotypeALC1 KO                               < 2e-16 ***
## poly(MMS, 2)2:genotypeALC1 KO                              0.829325    
## poly(MMS, 2)1:genotypeALC1 KO PARP1 KO                     1.47e-15 ***
## poly(MMS, 2)2:genotypeALC1 KO PARP1 KO                     0.833492    
## poly(MMS, 2)1:genotypePARP1 KO                             2.86e-11 ***
## poly(MMS, 2)2:genotypePARP1 KO                             0.383580    
## poly(Olaparib, 2)1:genotypeALC1 KO                          < 2e-16 ***
## poly(Olaparib, 2)2:genotypeALC1 KO                         1.66e-07 ***
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO                0.001002 ** 
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO                0.029642 *  
## poly(Olaparib, 2)1:genotypePARP1 KO                        0.000372 ***
## poly(Olaparib, 2)2:genotypePARP1 KO                        0.635223    
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO            < 2e-16 ***
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO           0.716804    
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO           0.883964    
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO           0.233850    
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO  0.072347 .  
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO  0.900542    
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO  0.854916    
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO  0.907219    
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypePARP1 KO          0.118582    
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypePARP1 KO          0.261229    
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypePARP1 KO          0.644697    
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypePARP1 KO          0.852227    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1224 on 156 degrees of freedom
## Multiple R-squared:  0.9614, Adjusted R-squared:  0.9528 
## F-statistic: 111.1 on 35 and 156 DF,  p-value: < 2.2e-16
cat("AIC: ", AIC(fit6))
## AIC:  -227.5884
simres <- simulateResiduals(fittedModel = fit6)
plot(simres)

fit7 <- lm(NormCounts2 ~ poly(MMS,2)*poly(Olaparib,2)*genotype, data = dataset)
print(summary(fit7))
## 
## Call:
## lm(formula = NormCounts2 ~ poly(MMS, 2) * poly(Olaparib, 2) * 
##     genotype, data = dataset)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.176276 -0.033812  0.002994  0.027257  0.229972 
## 
## Coefficients:
##                                                             Estimate Std. Error
## (Intercept)                                                 0.652490   0.008248
## poly(MMS, 2)1                                              -1.982081   0.114286
## poly(MMS, 2)2                                               0.125585   0.114286
## poly(Olaparib, 2)1                                         -2.149615   0.114286
## poly(Olaparib, 2)2                                         -0.356941   0.114286
## genotypeALC1 KO                                            -0.323846   0.011664
## genotypeALC1 KO PARP1 KO                                   -0.099232   0.011664
## genotypePARP1 KO                                           -0.071779   0.011664
## poly(MMS, 2)1:poly(Olaparib, 2)1                           -2.772074   1.583591
## poly(MMS, 2)2:poly(Olaparib, 2)1                            0.588500   1.583591
## poly(MMS, 2)1:poly(Olaparib, 2)2                            1.642428   1.583591
## poly(MMS, 2)2:poly(Olaparib, 2)2                           -0.650055   1.583591
## poly(MMS, 2)1:genotypeALC1 KO                              -0.098663   0.161625
## poly(MMS, 2)2:genotypeALC1 KO                              -0.086897   0.161625
## poly(MMS, 2)1:genotypeALC1 KO PARP1 KO                     -1.400108   0.161625
## poly(MMS, 2)2:genotypeALC1 KO PARP1 KO                     -0.059431   0.161625
## poly(MMS, 2)1:genotypePARP1 KO                             -1.222918   0.161625
## poly(MMS, 2)2:genotypePARP1 KO                             -0.189474   0.161625
## poly(Olaparib, 2)1:genotypeALC1 KO                         -0.833512   0.161625
## poly(Olaparib, 2)2:genotypeALC1 KO                          0.800812   0.161625
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO                 0.969218   0.161625
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO                 0.474688   0.161625
## poly(Olaparib, 2)1:genotypePARP1 KO                         0.967921   0.161625
## poly(Olaparib, 2)2:genotypePARP1 KO                         0.134821   0.161625
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO           17.668136   2.239536
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO           -0.864960   2.239536
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO           -1.045630   2.239536
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO            2.206714   2.239536
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO   5.222996   2.239536
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO  -0.421718   2.239536
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO   0.236286   2.239536
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO  -0.210946   2.239536
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypePARP1 KO           4.676650   2.239536
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypePARP1 KO          -3.205714   2.239536
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypePARP1 KO           1.106375   2.239536
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypePARP1 KO          -0.448244   2.239536
##                                                            t value Pr(>|t|)    
## (Intercept)                                                 79.110  < 2e-16 ***
## poly(MMS, 2)1                                              -17.343  < 2e-16 ***
## poly(MMS, 2)2                                                1.099  0.27352    
## poly(Olaparib, 2)1                                         -18.809  < 2e-16 ***
## poly(Olaparib, 2)2                                          -3.123  0.00213 ** 
## genotypeALC1 KO                                            -27.764  < 2e-16 ***
## genotypeALC1 KO PARP1 KO                                    -8.507 1.37e-14 ***
## genotypePARP1 KO                                            -6.154 6.12e-09 ***
## poly(MMS, 2)1:poly(Olaparib, 2)1                            -1.750  0.08200 .  
## poly(MMS, 2)2:poly(Olaparib, 2)1                             0.372  0.71068    
## poly(MMS, 2)1:poly(Olaparib, 2)2                             1.037  0.30127    
## poly(MMS, 2)2:poly(Olaparib, 2)2                            -0.410  0.68201    
## poly(MMS, 2)1:genotypeALC1 KO                               -0.610  0.54246    
## poly(MMS, 2)2:genotypeALC1 KO                               -0.538  0.59159    
## poly(MMS, 2)1:genotypeALC1 KO PARP1 KO                      -8.663 5.48e-15 ***
## poly(MMS, 2)2:genotypeALC1 KO PARP1 KO                      -0.368  0.71359    
## poly(MMS, 2)1:genotypePARP1 KO                              -7.566 3.11e-12 ***
## poly(MMS, 2)2:genotypePARP1 KO                              -1.172  0.24286    
## poly(Olaparib, 2)1:genotypeALC1 KO                          -5.157 7.51e-07 ***
## poly(Olaparib, 2)2:genotypeALC1 KO                           4.955 1.87e-06 ***
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO                  5.997 1.35e-08 ***
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO                  2.937  0.00382 ** 
## poly(Olaparib, 2)1:genotypePARP1 KO                          5.989 1.41e-08 ***
## poly(Olaparib, 2)2:genotypePARP1 KO                          0.834  0.40546    
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO             7.889 4.98e-13 ***
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO            -0.386  0.69986    
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO            -0.467  0.64123    
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO             0.985  0.32598    
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO    2.332  0.02097 *  
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO   -0.188  0.85088    
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO    0.106  0.91611    
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO   -0.094  0.92508    
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypePARP1 KO            2.088  0.03840 *  
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypePARP1 KO           -1.431  0.15431    
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypePARP1 KO            0.494  0.62199    
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypePARP1 KO           -0.200  0.84162    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.05714 on 156 degrees of freedom
## Multiple R-squared:  0.9668, Adjusted R-squared:  0.9594 
## F-statistic: 129.8 on 35 and 156 DF,  p-value: < 2.2e-16
cat("AIC: ", AIC(fit7))
## AIC:  -520.079
simres <- simulateResiduals(fittedModel = fit7)
plot(simres)

fit8 <- lmer(Counts ~ poly(MMS,2)*poly(Olaparib,2)*genotype + (1|UID), data = dataset)

print(summary(fit8))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ poly(MMS, 2) * poly(Olaparib, 2) * genotype + (1 | UID)
##    Data: dataset
## 
## REML criterion at convergence: 1981.4
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1127 -0.3008 -0.0111  0.3594  3.7456 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  UID      (Intercept) 48909    221.2   
##  Residual             23738    154.1   
## Number of obs: 192, groups:  UID, 48
## 
## Fixed effects:
##                                                            Estimate Std. Error
## (Intercept)                                                 1107.29      67.60
## poly(MMS, 2)1                                              -3328.30     308.14
## poly(MMS, 2)2                                                205.29     308.14
## poly(Olaparib, 2)1                                         -3571.07     936.75
## poly(Olaparib, 2)2                                          -652.71     936.75
## genotypeALC1 KO                                             -440.50      95.61
## genotypeALC1 KO PARP1 KO                                     -95.02      95.61
## genotypePARP1 KO                                            -498.90      95.61
## poly(MMS, 2)1:poly(Olaparib, 2)1                           -3386.19    4269.78
## poly(MMS, 2)2:poly(Olaparib, 2)1                             294.71    4269.78
## poly(MMS, 2)1:poly(Olaparib, 2)2                            2542.16    4269.78
## poly(MMS, 2)2:poly(Olaparib, 2)2                           -1386.81    4269.78
## poly(MMS, 2)1:genotypeALC1 KO                               -933.68     435.78
## poly(MMS, 2)2:genotypeALC1 KO                                -98.66     435.78
## poly(MMS, 2)1:genotypeALC1 KO PARP1 KO                     -3032.87     435.78
## poly(MMS, 2)2:genotypeALC1 KO PARP1 KO                        10.71     435.78
## poly(MMS, 2)1:genotypePARP1 KO                               -18.32     435.78
## poly(MMS, 2)2:genotypePARP1 KO                              -273.72     435.78
## poly(Olaparib, 2)1:genotypeALC1 KO                         -2449.82    1324.76
## poly(Olaparib, 2)2:genotypeALC1 KO                          1490.78    1324.76
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO                 1495.51    1324.76
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO                  833.05    1324.76
## poly(Olaparib, 2)1:genotypePARP1 KO                         2332.53    1324.76
## poly(Olaparib, 2)2:genotypePARP1 KO                          421.59    1324.76
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO           33486.40    6038.38
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO           -1021.01    6038.38
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO            -498.63    6038.38
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO            3943.39    6038.38
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO   6215.24    6038.38
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO    572.82    6038.38
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO   1285.62    6038.38
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO    -34.31    6038.38
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypePARP1 KO           5375.51    6038.38
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypePARP1 KO          -3068.70    6038.38
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypePARP1 KO            201.69    6038.38
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypePARP1 KO            245.28    6038.38
##                                                                  df t value
## (Intercept)                                                   36.00  16.379
## poly(MMS, 2)1                                                120.00 -10.801
## poly(MMS, 2)2                                                120.00   0.666
## poly(Olaparib, 2)1                                            36.00  -3.812
## poly(Olaparib, 2)2                                            36.00  -0.697
## genotypeALC1 KO                                               36.00  -4.607
## genotypeALC1 KO PARP1 KO                                      36.00  -0.994
## genotypePARP1 KO                                              36.00  -5.218
## poly(MMS, 2)1:poly(Olaparib, 2)1                             120.00  -0.793
## poly(MMS, 2)2:poly(Olaparib, 2)1                             120.00   0.069
## poly(MMS, 2)1:poly(Olaparib, 2)2                             120.00   0.595
## poly(MMS, 2)2:poly(Olaparib, 2)2                             120.00  -0.325
## poly(MMS, 2)1:genotypeALC1 KO                                120.00  -2.143
## poly(MMS, 2)2:genotypeALC1 KO                                120.00  -0.226
## poly(MMS, 2)1:genotypeALC1 KO PARP1 KO                       120.00  -6.960
## poly(MMS, 2)2:genotypeALC1 KO PARP1 KO                       120.00   0.025
## poly(MMS, 2)1:genotypePARP1 KO                               120.00  -0.042
## poly(MMS, 2)2:genotypePARP1 KO                               120.00  -0.628
## poly(Olaparib, 2)1:genotypeALC1 KO                            36.00  -1.849
## poly(Olaparib, 2)2:genotypeALC1 KO                            36.00   1.125
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO                   36.00   1.129
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO                   36.00   0.629
## poly(Olaparib, 2)1:genotypePARP1 KO                           36.00   1.761
## poly(Olaparib, 2)2:genotypePARP1 KO                           36.00   0.318
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO             120.00   5.546
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO             120.00  -0.169
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO             120.00  -0.083
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO             120.00   0.653
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO    120.00   1.029
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO    120.00   0.095
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO    120.00   0.213
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO    120.00  -0.006
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypePARP1 KO            120.00   0.890
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypePARP1 KO            120.00  -0.508
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypePARP1 KO            120.00   0.033
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypePARP1 KO            120.00   0.041
##                                                            Pr(>|t|)    
## (Intercept)                                                 < 2e-16 ***
## poly(MMS, 2)1                                               < 2e-16 ***
## poly(MMS, 2)2                                               0.50655    
## poly(Olaparib, 2)1                                          0.00052 ***
## poly(Olaparib, 2)2                                          0.49041    
## genotypeALC1 KO                                            4.95e-05 ***
## genotypeALC1 KO PARP1 KO                                    0.32692    
## genotypePARP1 KO                                           7.70e-06 ***
## poly(MMS, 2)1:poly(Olaparib, 2)1                            0.42931    
## poly(MMS, 2)2:poly(Olaparib, 2)1                            0.94509    
## poly(MMS, 2)1:poly(Olaparib, 2)2                            0.55271    
## poly(MMS, 2)2:poly(Olaparib, 2)2                            0.74590    
## poly(MMS, 2)1:genotypeALC1 KO                               0.03417 *  
## poly(MMS, 2)2:genotypeALC1 KO                               0.82128    
## poly(MMS, 2)1:genotypeALC1 KO PARP1 KO                     1.94e-10 ***
## poly(MMS, 2)2:genotypeALC1 KO PARP1 KO                      0.98044    
## poly(MMS, 2)1:genotypePARP1 KO                              0.96654    
## poly(MMS, 2)2:genotypePARP1 KO                              0.53112    
## poly(Olaparib, 2)1:genotypeALC1 KO                          0.07265 .  
## poly(Olaparib, 2)2:genotypeALC1 KO                          0.26790    
## poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO                 0.26641    
## poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO                 0.53343    
## poly(Olaparib, 2)1:genotypePARP1 KO                         0.08678 .  
## poly(Olaparib, 2)2:genotypePARP1 KO                         0.75214    
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO           1.77e-07 ***
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO            0.86601    
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO            0.93433    
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO            0.51497    
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO   0.30541    
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypeALC1 KO PARP1 KO   0.92458    
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO   0.83176    
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypeALC1 KO PARP1 KO   0.99548    
## poly(MMS, 2)1:poly(Olaparib, 2)1:genotypePARP1 KO           0.37513    
## poly(MMS, 2)2:poly(Olaparib, 2)1:genotypePARP1 KO           0.61225    
## poly(MMS, 2)1:poly(Olaparib, 2)2:genotypePARP1 KO           0.97341    
## poly(MMS, 2)2:poly(Olaparib, 2)2:genotypePARP1 KO           0.96767    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cat("AIC: ", AIC(fit8))
## AIC:  2057.441
simres <- simulateResiduals(fittedModel = fit8)
plot(simres)

Cubic formula

fit9 <- lm(Counts ~ poly(MMS,3)*poly(Olaparib,3)*genotype, data = dataset)
print(summary(fit9))
## 
## Call:
## lm(formula = Counts ~ poly(MMS, 3) * poly(Olaparib, 3) * genotype, 
##     data = dataset)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -554.00 -109.83  -15.50   59.67  834.00 
## 
## Coefficients:
##                                                            Estimate Std. Error
## (Intercept)                                                 1107.29      41.20
## poly(MMS, 3)1                                              -3328.30     570.86
## poly(MMS, 3)2                                                205.29     570.86
## poly(MMS, 3)3                                                 56.44     570.86
## poly(Olaparib, 3)1                                         -3571.07     570.86
## poly(Olaparib, 3)2                                          -652.71     570.86
## poly(Olaparib, 3)3                                           192.56     570.86
## genotypeALC1 KO                                             -440.50      58.26
## genotypeALC1 KO PARP1 KO                                     -95.02      58.26
## genotypePARP1 KO                                            -498.90      58.26
## poly(MMS, 3)1:poly(Olaparib, 3)1                           -3386.19    7910.00
## poly(MMS, 3)2:poly(Olaparib, 3)1                             294.71    7910.00
## poly(MMS, 3)3:poly(Olaparib, 3)1                             130.48    7910.00
## poly(MMS, 3)1:poly(Olaparib, 3)2                            2542.16    7910.00
## poly(MMS, 3)2:poly(Olaparib, 3)2                           -1386.81    7910.00
## poly(MMS, 3)3:poly(Olaparib, 3)2                            1300.58    7910.00
## poly(MMS, 3)1:poly(Olaparib, 3)3                            1588.63    7910.00
## poly(MMS, 3)2:poly(Olaparib, 3)3                           -2319.15    7910.00
## poly(MMS, 3)3:poly(Olaparib, 3)3                            -421.09    7910.00
## poly(MMS, 3)1:genotypeALC1 KO                               -933.68     807.31
## poly(MMS, 3)2:genotypeALC1 KO                                -98.66     807.31
## poly(MMS, 3)3:genotypeALC1 KO                                -58.38     807.31
## poly(MMS, 3)1:genotypeALC1 KO PARP1 KO                     -3032.87     807.31
## poly(MMS, 3)2:genotypeALC1 KO PARP1 KO                        10.71     807.31
## poly(MMS, 3)3:genotypeALC1 KO PARP1 KO                       745.76     807.31
## poly(MMS, 3)1:genotypePARP1 KO                               -18.32     807.31
## poly(MMS, 3)2:genotypePARP1 KO                              -273.72     807.31
## poly(MMS, 3)3:genotypePARP1 KO                                20.96     807.31
## poly(Olaparib, 3)1:genotypeALC1 KO                         -2449.82     807.31
## poly(Olaparib, 3)2:genotypeALC1 KO                          1490.78     807.31
## poly(Olaparib, 3)3:genotypeALC1 KO                          -301.66     807.31
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO                 1495.51     807.31
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO                  833.05     807.31
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO                 -197.92     807.31
## poly(Olaparib, 3)1:genotypePARP1 KO                         2332.53     807.31
## poly(Olaparib, 3)2:genotypePARP1 KO                          421.59     807.31
## poly(Olaparib, 3)3:genotypePARP1 KO                         -153.03     807.31
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO           33486.40   11186.43
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO           -1021.01   11186.43
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO           -1199.24   11186.43
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO            -498.63   11186.43
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO            3943.39   11186.43
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO            2162.96   11186.43
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO           -7062.78   11186.43
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO            6446.72   11186.43
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO           -2324.73   11186.43
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO   6215.24   11186.43
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO    572.82   11186.43
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO   4370.53   11186.43
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO   1285.62   11186.43
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO    -34.31   11186.43
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO  -1890.79   11186.43
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO  -3477.78   11186.43
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO   2036.67   11186.43
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO   -380.31   11186.43
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypePARP1 KO           5375.51   11186.43
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypePARP1 KO          -3068.70   11186.43
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypePARP1 KO           1362.83   11186.43
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypePARP1 KO            201.69   11186.43
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypePARP1 KO            245.28   11186.43
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypePARP1 KO          -1381.99   11186.43
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypePARP1 KO           -595.31   11186.43
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypePARP1 KO           4218.88   11186.43
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypePARP1 KO            421.76   11186.43
##                                                            t value Pr(>|t|)    
## (Intercept)                                                 26.877  < 2e-16 ***
## poly(MMS, 3)1                                               -5.830 4.25e-08 ***
## poly(MMS, 3)2                                                0.360  0.71972    
## poly(MMS, 3)3                                                0.099  0.92139    
## poly(Olaparib, 3)1                                          -6.256 5.47e-09 ***
## poly(Olaparib, 3)2                                          -1.143  0.25501    
## poly(Olaparib, 3)3                                           0.337  0.73642    
## genotypeALC1 KO                                             -7.561 6.82e-12 ***
## genotypeALC1 KO PARP1 KO                                    -1.631  0.10537    
## genotypePARP1 KO                                            -8.563 2.97e-14 ***
## poly(MMS, 3)1:poly(Olaparib, 3)1                            -0.428  0.66930    
## poly(MMS, 3)2:poly(Olaparib, 3)1                             0.037  0.97034    
## poly(MMS, 3)3:poly(Olaparib, 3)1                             0.016  0.98687    
## poly(MMS, 3)1:poly(Olaparib, 3)2                             0.321  0.74844    
## poly(MMS, 3)2:poly(Olaparib, 3)2                            -0.175  0.86110    
## poly(MMS, 3)3:poly(Olaparib, 3)2                             0.164  0.86966    
## poly(MMS, 3)1:poly(Olaparib, 3)3                             0.201  0.84114    
## poly(MMS, 3)2:poly(Olaparib, 3)3                            -0.293  0.76985    
## poly(MMS, 3)3:poly(Olaparib, 3)3                            -0.053  0.95763    
## poly(MMS, 3)1:genotypeALC1 KO                               -1.157  0.24962    
## poly(MMS, 3)2:genotypeALC1 KO                               -0.122  0.90293    
## poly(MMS, 3)3:genotypeALC1 KO                               -0.072  0.94246    
## poly(MMS, 3)1:genotypeALC1 KO PARP1 KO                      -3.757  0.00026 ***
## poly(MMS, 3)2:genotypeALC1 KO PARP1 KO                       0.013  0.98944    
## poly(MMS, 3)3:genotypeALC1 KO PARP1 KO                       0.924  0.35735    
## poly(MMS, 3)1:genotypePARP1 KO                              -0.023  0.98193    
## poly(MMS, 3)2:genotypePARP1 KO                              -0.339  0.73513    
## poly(MMS, 3)3:genotypePARP1 KO                               0.026  0.97933    
## poly(Olaparib, 3)1:genotypeALC1 KO                          -3.035  0.00292 ** 
## poly(Olaparib, 3)2:genotypeALC1 KO                           1.847  0.06711 .  
## poly(Olaparib, 3)3:genotypeALC1 KO                          -0.374  0.70928    
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO                  1.852  0.06626 .  
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO                  1.032  0.30407    
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO                 -0.245  0.80673    
## poly(Olaparib, 3)1:genotypePARP1 KO                          2.889  0.00454 ** 
## poly(Olaparib, 3)2:genotypePARP1 KO                          0.522  0.60242    
## poly(Olaparib, 3)3:genotypePARP1 KO                         -0.190  0.84996    
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO             2.993  0.00331 ** 
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO            -0.091  0.92742    
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO            -0.107  0.91479    
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO            -0.045  0.96452    
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO             0.353  0.72503    
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO             0.193  0.84699    
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO            -0.631  0.52892    
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO             0.576  0.56543    
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO            -0.208  0.83570    
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO    0.556  0.57945    
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO    0.051  0.95924    
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO    0.391  0.69667    
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO    0.115  0.90868    
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO   -0.003  0.99756    
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO   -0.169  0.86604    
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO   -0.311  0.75639    
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO    0.182  0.85582    
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO   -0.034  0.97293    
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypePARP1 KO            0.481  0.63166    
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypePARP1 KO           -0.274  0.78428    
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypePARP1 KO            0.122  0.90323    
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypePARP1 KO            0.018  0.98564    
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypePARP1 KO            0.022  0.98254    
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypePARP1 KO           -0.124  0.90187    
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypePARP1 KO           -0.053  0.95764    
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypePARP1 KO            0.377  0.70669    
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypePARP1 KO            0.038  0.96998    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 285.4 on 128 degrees of freedom
## Multiple R-squared:  0.8109, Adjusted R-squared:  0.7178 
## F-statistic: 8.713 on 63 and 128 DF,  p-value: < 2.2e-16
cat("AIC: ", AIC(fit9))
## AIC:  2768.155
simres <- simulateResiduals(fittedModel = fit9)
plot(simres)

fit10 <- lm(NormCounts ~ poly(MMS,3)*poly(Olaparib,3)*genotype, data = dataset)
print(summary(fit10))
## 
## Call:
## lm(formula = NormCounts ~ poly(MMS, 3) * poly(Olaparib, 3) * 
##     genotype, data = dataset)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.44057 -0.05015  0.00013  0.04718  0.59646 
## 
## Coefficients:
##                                                              Estimate
## (Intercept)                                                 1.000e+00
## poly(MMS, 3)1                                              -3.038e+00
## poly(MMS, 3)2                                               1.925e-01
## poly(MMS, 3)3                                               2.882e-02
## poly(Olaparib, 3)1                                         -3.294e+00
## poly(Olaparib, 3)2                                         -5.470e-01
## poly(Olaparib, 3)3                                          2.354e-01
## genotypeALC1 KO                                             1.488e-16
## genotypeALC1 KO PARP1 KO                                   -2.135e-16
## genotypePARP1 KO                                            1.954e-17
## poly(MMS, 3)1:poly(Olaparib, 3)1                           -4.248e+00
## poly(MMS, 3)2:poly(Olaparib, 3)1                            9.019e-01
## poly(MMS, 3)3:poly(Olaparib, 3)1                           -7.839e-02
## poly(MMS, 3)1:poly(Olaparib, 3)2                            2.517e+00
## poly(MMS, 3)2:poly(Olaparib, 3)2                           -9.963e-01
## poly(MMS, 3)3:poly(Olaparib, 3)2                            1.164e+00
## poly(MMS, 3)1:poly(Olaparib, 3)3                            1.649e+00
## poly(MMS, 3)2:poly(Olaparib, 3)3                           -2.059e+00
## poly(MMS, 3)3:poly(Olaparib, 3)3                           -3.591e-01
## poly(MMS, 3)1:genotypeALC1 KO                              -3.294e+00
## poly(MMS, 3)2:genotypeALC1 KO                              -7.475e-02
## poly(MMS, 3)3:genotypeALC1 KO                               4.203e-02
## poly(MMS, 3)1:genotypeALC1 KO PARP1 KO                     -3.076e+00
## poly(MMS, 3)2:genotypeALC1 KO PARP1 KO                     -7.290e-02
## poly(MMS, 3)3:genotypeALC1 KO PARP1 KO                      8.635e-01
## poly(MMS, 3)1:genotypePARP1 KO                             -2.481e+00
## poly(MMS, 3)2:genotypePARP1 KO                             -3.025e-01
## poly(MMS, 3)3:genotypePARP1 KO                              6.485e-02
## poly(Olaparib, 3)1:genotypeALC1 KO                         -5.783e+00
## poly(Olaparib, 3)2:genotypeALC1 KO                          1.898e+00
## poly(Olaparib, 3)3:genotypeALC1 KO                         -4.394e-01
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO                 1.161e+00
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO                 7.599e-01
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO                -2.558e-01
## poly(Olaparib, 3)1:genotypePARP1 KO                         1.260e+00
## poly(Olaparib, 3)2:genotypePARP1 KO                         1.645e-01
## poly(Olaparib, 3)3:genotypePARP1 KO                        -1.662e-01
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO            4.957e+01
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO           -1.743e+00
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO           -2.668e+00
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO           -7.012e-01
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO            5.733e+00
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO            3.716e+00
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO           -9.138e+00
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO            7.724e+00
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO           -3.223e+00
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO   8.678e+00
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO  -6.005e-01
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO   4.810e+00
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO   8.786e-01
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO  -5.600e-01
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO  -1.881e+00
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO  -3.606e+00
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO   2.123e+00
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO  -3.858e-01
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypePARP1 KO           7.528e+00
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypePARP1 KO          -5.409e+00
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypePARP1 KO           2.594e+00
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypePARP1 KO           2.216e+00
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypePARP1 KO          -8.950e-01
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypePARP1 KO          -1.114e+00
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypePARP1 KO          -1.330e-01
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypePARP1 KO           5.157e+00
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypePARP1 KO           2.856e-01
##                                                            Std. Error t value
## (Intercept)                                                 1.743e-02  57.380
## poly(MMS, 3)1                                               2.415e-01 -12.579
## poly(MMS, 3)2                                               2.415e-01   0.797
## poly(MMS, 3)3                                               2.415e-01   0.119
## poly(Olaparib, 3)1                                          2.415e-01 -13.643
## poly(Olaparib, 3)2                                          2.415e-01  -2.265
## poly(Olaparib, 3)3                                          2.415e-01   0.975
## genotypeALC1 KO                                             2.465e-02   0.000
## genotypeALC1 KO PARP1 KO                                    2.465e-02   0.000
## genotypePARP1 KO                                            2.465e-02   0.000
## poly(MMS, 3)1:poly(Olaparib, 3)1                            3.346e+00  -1.270
## poly(MMS, 3)2:poly(Olaparib, 3)1                            3.346e+00   0.270
## poly(MMS, 3)3:poly(Olaparib, 3)1                            3.346e+00  -0.023
## poly(MMS, 3)1:poly(Olaparib, 3)2                            3.346e+00   0.752
## poly(MMS, 3)2:poly(Olaparib, 3)2                            3.346e+00  -0.298
## poly(MMS, 3)3:poly(Olaparib, 3)2                            3.346e+00   0.348
## poly(MMS, 3)1:poly(Olaparib, 3)3                            3.346e+00   0.493
## poly(MMS, 3)2:poly(Olaparib, 3)3                            3.346e+00  -0.615
## poly(MMS, 3)3:poly(Olaparib, 3)3                            3.346e+00  -0.107
## poly(MMS, 3)1:genotypeALC1 KO                               3.415e-01  -9.644
## poly(MMS, 3)2:genotypeALC1 KO                               3.415e-01  -0.219
## poly(MMS, 3)3:genotypeALC1 KO                               3.415e-01   0.123
## poly(MMS, 3)1:genotypeALC1 KO PARP1 KO                      3.415e-01  -9.006
## poly(MMS, 3)2:genotypeALC1 KO PARP1 KO                      3.415e-01  -0.213
## poly(MMS, 3)3:genotypeALC1 KO PARP1 KO                      3.415e-01   2.528
## poly(MMS, 3)1:genotypePARP1 KO                              3.415e-01  -7.266
## poly(MMS, 3)2:genotypePARP1 KO                              3.415e-01  -0.886
## poly(MMS, 3)3:genotypePARP1 KO                              3.415e-01   0.190
## poly(Olaparib, 3)1:genotypeALC1 KO                          3.415e-01 -16.932
## poly(Olaparib, 3)2:genotypeALC1 KO                          3.415e-01   5.557
## poly(Olaparib, 3)3:genotypeALC1 KO                          3.415e-01  -1.287
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO                 3.415e-01   3.399
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO                 3.415e-01   2.225
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO                 3.415e-01  -0.749
## poly(Olaparib, 3)1:genotypePARP1 KO                         3.415e-01   3.688
## poly(Olaparib, 3)2:genotypePARP1 KO                         3.415e-01   0.482
## poly(Olaparib, 3)3:genotypePARP1 KO                         3.415e-01  -0.487
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO            4.732e+00  10.476
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO            4.732e+00  -0.368
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO            4.732e+00  -0.564
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO            4.732e+00  -0.148
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO            4.732e+00   1.211
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO            4.732e+00   0.785
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO            4.732e+00  -1.931
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO            4.732e+00   1.632
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO            4.732e+00  -0.681
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO   4.732e+00   1.834
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO   4.732e+00  -0.127
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO   4.732e+00   1.016
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO   4.732e+00   0.186
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO   4.732e+00  -0.118
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO   4.732e+00  -0.398
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO   4.732e+00  -0.762
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO   4.732e+00   0.449
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO   4.732e+00  -0.082
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypePARP1 KO           4.732e+00   1.591
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypePARP1 KO           4.732e+00  -1.143
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypePARP1 KO           4.732e+00   0.548
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypePARP1 KO           4.732e+00   0.468
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypePARP1 KO           4.732e+00  -0.189
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypePARP1 KO           4.732e+00  -0.235
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypePARP1 KO           4.732e+00  -0.028
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypePARP1 KO           4.732e+00   1.090
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypePARP1 KO           4.732e+00   0.060
##                                                            Pr(>|t|)    
## (Intercept)                                                 < 2e-16 ***
## poly(MMS, 3)1                                               < 2e-16 ***
## poly(MMS, 3)2                                              0.426909    
## poly(MMS, 3)3                                              0.905198    
## poly(Olaparib, 3)1                                          < 2e-16 ***
## poly(Olaparib, 3)2                                         0.025172 *  
## poly(Olaparib, 3)3                                         0.331400    
## genotypeALC1 KO                                            1.000000    
## genotypeALC1 KO PARP1 KO                                   1.000000    
## genotypePARP1 KO                                           1.000000    
## poly(MMS, 3)1:poly(Olaparib, 3)1                           0.206504    
## poly(MMS, 3)2:poly(Olaparib, 3)1                           0.787943    
## poly(MMS, 3)3:poly(Olaparib, 3)1                           0.981347    
## poly(MMS, 3)1:poly(Olaparib, 3)2                           0.453270    
## poly(MMS, 3)2:poly(Olaparib, 3)2                           0.766384    
## poly(MMS, 3)3:poly(Olaparib, 3)2                           0.728591    
## poly(MMS, 3)1:poly(Olaparib, 3)3                           0.623032    
## poly(MMS, 3)2:poly(Olaparib, 3)3                           0.539329    
## poly(MMS, 3)3:poly(Olaparib, 3)3                           0.914712    
## poly(MMS, 3)1:genotypeALC1 KO                               < 2e-16 ***
## poly(MMS, 3)2:genotypeALC1 KO                              0.827089    
## poly(MMS, 3)3:genotypeALC1 KO                              0.902233    
## poly(MMS, 3)1:genotypeALC1 KO PARP1 KO                     2.55e-15 ***
## poly(MMS, 3)2:genotypeALC1 KO PARP1 KO                     0.831309    
## poly(MMS, 3)3:genotypeALC1 KO PARP1 KO                     0.012672 *  
## poly(MMS, 3)1:genotypePARP1 KO                             3.23e-11 ***
## poly(MMS, 3)2:genotypePARP1 KO                             0.377418    
## poly(MMS, 3)3:genotypePARP1 KO                             0.849705    
## poly(Olaparib, 3)1:genotypeALC1 KO                          < 2e-16 ***
## poly(Olaparib, 3)2:genotypeALC1 KO                         1.53e-07 ***
## poly(Olaparib, 3)3:genotypeALC1 KO                         0.200548    
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO                0.000901 ***
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO                0.027831 *  
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO                0.455257    
## poly(Olaparib, 3)1:genotypePARP1 KO                        0.000333 ***
## poly(Olaparib, 3)2:genotypePARP1 KO                        0.630752    
## poly(Olaparib, 3)3:genotypePARP1 KO                        0.627231    
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO            < 2e-16 ***
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO           0.713209    
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO           0.573939    
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO           0.882430    
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO           0.227940    
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO           0.433744    
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO           0.055672 .  
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO           0.105089    
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO           0.497080    
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO  0.068984 .  
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO  0.899223    
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO  0.311314    
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO  0.853006    
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO  0.905988    
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO  0.691645    
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO  0.447499    
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO  0.654485    
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO  0.935148    
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypePARP1 KO          0.114104    
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypePARP1 KO          0.255167    
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypePARP1 KO          0.584556    
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypePARP1 KO          0.640321    
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypePARP1 KO          0.850282    
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypePARP1 KO          0.814328    
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypePARP1 KO          0.977626    
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypePARP1 KO          0.277852    
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypePARP1 KO          0.951975    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.1207 on 128 degrees of freedom
## Multiple R-squared:  0.9692, Adjusted R-squared:  0.954 
## F-statistic: 63.91 on 63 and 128 DF,  p-value: < 2.2e-16
cat("AIC: ", AIC(fit10))
## AIC:  -214.7912
simres <- simulateResiduals(fittedModel = fit10)
plot(simres)

fit11 <- lm(NormCounts2 ~ poly(MMS,3)*poly(Olaparib,3)*genotype, data = dataset)
print(summary(fit11))
## 
## Call:
## lm(formula = NormCounts2 ~ poly(MMS, 3) * poly(Olaparib, 3) * 
##     genotype, data = dataset)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -0.154847 -0.029793  0.000046  0.022533  0.196022 
## 
## Coefficients:
##                                                             Estimate Std. Error
## (Intercept)                                                 0.652490   0.008047
## poly(MMS, 3)1                                              -1.982081   0.111504
## poly(MMS, 3)2                                               0.125585   0.111504
## poly(MMS, 3)3                                               0.018803   0.111504
## poly(Olaparib, 3)1                                         -2.149615   0.111504
## poly(Olaparib, 3)2                                         -0.356941   0.111504
## poly(Olaparib, 3)3                                          0.153626   0.111504
## genotypeALC1 KO                                            -0.323846   0.011380
## genotypeALC1 KO PARP1 KO                                   -0.099232   0.011380
## genotypePARP1 KO                                           -0.071779   0.011380
## poly(MMS, 3)1:poly(Olaparib, 3)1                           -2.772074   1.545040
## poly(MMS, 3)2:poly(Olaparib, 3)1                            0.588500   1.545040
## poly(MMS, 3)3:poly(Olaparib, 3)1                           -0.051146   1.545040
## poly(MMS, 3)1:poly(Olaparib, 3)2                            1.642428   1.545040
## poly(MMS, 3)2:poly(Olaparib, 3)2                           -0.650055   1.545040
## poly(MMS, 3)3:poly(Olaparib, 3)2                            0.759265   1.545040
## poly(MMS, 3)1:poly(Olaparib, 3)3                            1.075823   1.545040
## poly(MMS, 3)2:poly(Olaparib, 3)3                           -1.343780   1.545040
## poly(MMS, 3)3:poly(Olaparib, 3)3                           -0.234287   1.545040
## poly(MMS, 3)1:genotypeALC1 KO                              -0.098663   0.157690
## poly(MMS, 3)2:genotypeALC1 KO                              -0.086897   0.157690
## poly(MMS, 3)3:genotypeALC1 KO                               0.004482   0.157690
## poly(MMS, 3)1:genotypeALC1 KO PARP1 KO                     -1.400108   0.157690
## poly(MMS, 3)2:genotypeALC1 KO PARP1 KO                     -0.059431   0.157690
## poly(MMS, 3)3:genotypeALC1 KO PARP1 KO                      0.474874   0.157690
## poly(MMS, 3)1:genotypePARP1 KO                             -1.222918   0.157690
## poly(MMS, 3)2:genotypePARP1 KO                             -0.189474   0.157690
## poly(MMS, 3)3:genotypePARP1 KO                              0.035588   0.157690
## poly(Olaparib, 3)1:genotypeALC1 KO                         -0.833512   0.157690
## poly(Olaparib, 3)2:genotypeALC1 KO                          0.800812   0.157690
## poly(Olaparib, 3)3:genotypeALC1 KO                         -0.220653   0.157690
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO                 0.969218   0.157690
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO                 0.474688   0.157690
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO                -0.164874   0.157690
## poly(Olaparib, 3)1:genotypePARP1 KO                         0.967921   0.157690
## poly(Olaparib, 3)2:genotypePARP1 KO                         0.134821   0.157690
## poly(Olaparib, 3)3:genotypePARP1 KO                        -0.113442   0.157690
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO           17.668136   2.185017
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO           -0.864960   2.185017
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO           -0.851279   2.185017
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO           -1.045630   2.185017
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO            2.206714   2.185017
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO            0.844398   2.185017
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO           -3.537268   2.185017
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO            3.205352   2.185017
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO           -0.942846   2.185017
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO   5.222996   2.185017
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO  -0.421718   2.185017
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO   2.669019   2.185017
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO   0.236286   2.185017
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO  -0.210946   2.185017
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO  -1.156209   2.185017
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO  -2.158421   2.185017
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO   1.378809   2.185017
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO  -0.177819   2.185017
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypePARP1 KO           4.676650   2.185017
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypePARP1 KO          -3.205714   2.185017
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypePARP1 KO           1.511881   2.185017
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypePARP1 KO           1.106375   2.185017
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypePARP1 KO          -0.448244   2.185017
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypePARP1 KO          -0.730210   2.185017
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypePARP1 KO          -0.195567   2.185017
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypePARP1 KO           3.142555   2.185017
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypePARP1 KO           0.191598   2.185017
##                                                            t value Pr(>|t|)    
## (Intercept)                                                 81.084  < 2e-16 ***
## poly(MMS, 3)1                                              -17.776  < 2e-16 ***
## poly(MMS, 3)2                                                1.126  0.26215    
## poly(MMS, 3)3                                                0.169  0.86635    
## poly(Olaparib, 3)1                                         -19.278  < 2e-16 ***
## poly(Olaparib, 3)2                                          -3.201  0.00173 ** 
## poly(Olaparib, 3)3                                           1.378  0.17068    
## genotypeALC1 KO                                            -28.457  < 2e-16 ***
## genotypeALC1 KO PARP1 KO                                    -8.720 1.25e-14 ***
## genotypePARP1 KO                                            -6.307 4.24e-09 ***
## poly(MMS, 3)1:poly(Olaparib, 3)1                            -1.794  0.07515 .  
## poly(MMS, 3)2:poly(Olaparib, 3)1                             0.381  0.70391    
## poly(MMS, 3)3:poly(Olaparib, 3)1                            -0.033  0.97364    
## poly(MMS, 3)1:poly(Olaparib, 3)2                             1.063  0.28977    
## poly(MMS, 3)2:poly(Olaparib, 3)2                            -0.421  0.67465    
## poly(MMS, 3)3:poly(Olaparib, 3)2                             0.491  0.62397    
## poly(MMS, 3)1:poly(Olaparib, 3)3                             0.696  0.48750    
## poly(MMS, 3)2:poly(Olaparib, 3)3                            -0.870  0.38607    
## poly(MMS, 3)3:poly(Olaparib, 3)3                            -0.152  0.87971    
## poly(MMS, 3)1:genotypeALC1 KO                               -0.626  0.53264    
## poly(MMS, 3)2:genotypeALC1 KO                               -0.551  0.58255    
## poly(MMS, 3)3:genotypeALC1 KO                                0.028  0.97737    
## poly(MMS, 3)1:genotypeALC1 KO PARP1 KO                      -8.879 5.17e-15 ***
## poly(MMS, 3)2:genotypeALC1 KO PARP1 KO                      -0.377  0.70688    
## poly(MMS, 3)3:genotypeALC1 KO PARP1 KO                       3.011  0.00313 ** 
## poly(MMS, 3)1:genotypePARP1 KO                              -7.755 2.41e-12 ***
## poly(MMS, 3)2:genotypePARP1 KO                              -1.202  0.23175    
## poly(MMS, 3)3:genotypePARP1 KO                               0.226  0.82181    
## poly(Olaparib, 3)1:genotypeALC1 KO                          -5.286 5.24e-07 ***
## poly(Olaparib, 3)2:genotypeALC1 KO                           5.078 1.31e-06 ***
## poly(Olaparib, 3)3:genotypeALC1 KO                          -1.399  0.16415    
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO                  6.146 9.33e-09 ***
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO                  3.010  0.00315 ** 
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO                 -1.046  0.29774    
## poly(Olaparib, 3)1:genotypePARP1 KO                          6.138 9.71e-09 ***
## poly(Olaparib, 3)2:genotypePARP1 KO                          0.855  0.39416    
## poly(Olaparib, 3)3:genotypePARP1 KO                         -0.719  0.47321    
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO             8.086 4.05e-13 ***
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO            -0.396  0.69287    
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO            -0.390  0.69748    
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO            -0.479  0.63308    
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO             1.010  0.31443    
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO             0.386  0.69981    
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO            -1.619  0.10794    
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO             1.467  0.14484    
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO            -0.432  0.66683    
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO    2.390  0.01829 *  
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO   -0.193  0.84726    
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO    1.222  0.22414    
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO    0.108  0.91405    
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO   -0.097  0.92324    
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO   -0.529  0.59762    
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO   -0.988  0.32510    
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO    0.631  0.52915    
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO   -0.081  0.93527    
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypePARP1 KO            2.140  0.03422 *  
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypePARP1 KO           -1.467  0.14479    
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypePARP1 KO            0.692  0.49023    
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypePARP1 KO            0.506  0.61348    
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypePARP1 KO           -0.205  0.83779    
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypePARP1 KO           -0.334  0.73878    
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypePARP1 KO           -0.090  0.92882    
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypePARP1 KO            1.438  0.15281    
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypePARP1 KO            0.088  0.93026    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.05575 on 128 degrees of freedom
## Multiple R-squared:  0.9741, Adjusted R-squared:  0.9613 
## F-statistic: 76.32 on 63 and 128 DF,  p-value: < 2.2e-16
cat("AIC: ", AIC(fit11))
## AIC:  -511.5253
simres <- simulateResiduals(fittedModel = fit11)
plot(simres)

fit12 <- lmer(Counts ~ poly(MMS,3)*poly(Olaparib,3)*genotype + (1|UID), data = dataset)

print(summary(fit12))
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: Counts ~ poly(MMS, 3) * poly(Olaparib, 3) * genotype + (1 | UID)
##    Data: dataset
## 
## REML criterion at convergence: 1481.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.8984 -0.2742 -0.0202  0.3026  3.1715 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  UID      (Intercept) 54977    234.5   
##  Residual             26492    162.8   
## Number of obs: 192, groups:  UID, 48
## 
## Fixed effects:
##                                                            Estimate Std. Error
## (Intercept)                                                 1107.29      71.65
## poly(MMS, 3)1                                              -3328.30     325.53
## poly(MMS, 3)2                                                205.29     325.53
## poly(MMS, 3)3                                                 56.44     325.53
## poly(Olaparib, 3)1                                         -3571.07     992.77
## poly(Olaparib, 3)2                                          -652.71     992.77
## poly(Olaparib, 3)3                                           192.56     992.77
## genotypeALC1 KO                                             -440.50     101.32
## genotypeALC1 KO PARP1 KO                                     -95.02     101.32
## genotypePARP1 KO                                            -498.90     101.32
## poly(MMS, 3)1:poly(Olaparib, 3)1                           -3386.19    4510.64
## poly(MMS, 3)2:poly(Olaparib, 3)1                             294.71    4510.64
## poly(MMS, 3)3:poly(Olaparib, 3)1                             130.48    4510.64
## poly(MMS, 3)1:poly(Olaparib, 3)2                            2542.16    4510.64
## poly(MMS, 3)2:poly(Olaparib, 3)2                           -1386.81    4510.64
## poly(MMS, 3)3:poly(Olaparib, 3)2                            1300.58    4510.64
## poly(MMS, 3)1:poly(Olaparib, 3)3                            1588.63    4510.64
## poly(MMS, 3)2:poly(Olaparib, 3)3                           -2319.15    4510.64
## poly(MMS, 3)3:poly(Olaparib, 3)3                            -421.09    4510.64
## poly(MMS, 3)1:genotypeALC1 KO                               -933.68     460.37
## poly(MMS, 3)2:genotypeALC1 KO                                -98.66     460.37
## poly(MMS, 3)3:genotypeALC1 KO                                -58.38     460.37
## poly(MMS, 3)1:genotypeALC1 KO PARP1 KO                     -3032.87     460.37
## poly(MMS, 3)2:genotypeALC1 KO PARP1 KO                        10.71     460.37
## poly(MMS, 3)3:genotypeALC1 KO PARP1 KO                       745.76     460.37
## poly(MMS, 3)1:genotypePARP1 KO                               -18.32     460.37
## poly(MMS, 3)2:genotypePARP1 KO                              -273.72     460.37
## poly(MMS, 3)3:genotypePARP1 KO                                20.96     460.37
## poly(Olaparib, 3)1:genotypeALC1 KO                         -2449.82    1403.99
## poly(Olaparib, 3)2:genotypeALC1 KO                          1490.78    1403.99
## poly(Olaparib, 3)3:genotypeALC1 KO                          -301.66    1403.99
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO                 1495.51    1403.99
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO                  833.05    1403.99
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO                 -197.92    1403.99
## poly(Olaparib, 3)1:genotypePARP1 KO                         2332.53    1403.99
## poly(Olaparib, 3)2:genotypePARP1 KO                          421.59    1403.99
## poly(Olaparib, 3)3:genotypePARP1 KO                         -153.03    1403.99
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO           33486.40    6379.01
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO           -1021.01    6379.01
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO           -1199.24    6379.01
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO            -498.63    6379.01
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO            3943.39    6379.01
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO            2162.96    6379.01
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO           -7062.78    6379.01
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO            6446.72    6379.01
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO           -2324.73    6379.01
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO   6215.24    6379.01
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO    572.82    6379.01
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO   4370.53    6379.01
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO   1285.62    6379.01
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO    -34.31    6379.01
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO  -1890.79    6379.01
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO  -3477.78    6379.01
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO   2036.67    6379.01
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO   -380.31    6379.01
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypePARP1 KO           5375.51    6379.01
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypePARP1 KO          -3068.70    6379.01
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypePARP1 KO           1362.83    6379.01
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypePARP1 KO            201.69    6379.01
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypePARP1 KO            245.28    6379.01
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypePARP1 KO          -1381.99    6379.01
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypePARP1 KO           -595.31    6379.01
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypePARP1 KO           4218.88    6379.01
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypePARP1 KO            421.76    6379.01
##                                                                  df t value
## (Intercept)                                                   32.00  15.455
## poly(MMS, 3)1                                                 96.00 -10.224
## poly(MMS, 3)2                                                 96.00   0.631
## poly(MMS, 3)3                                                 96.00   0.173
## poly(Olaparib, 3)1                                            32.00  -3.597
## poly(Olaparib, 3)2                                            32.00  -0.657
## poly(Olaparib, 3)3                                            32.00   0.194
## genotypeALC1 KO                                               32.00  -4.347
## genotypeALC1 KO PARP1 KO                                      32.00  -0.938
## genotypePARP1 KO                                              32.00  -4.924
## poly(MMS, 3)1:poly(Olaparib, 3)1                              96.00  -0.751
## poly(MMS, 3)2:poly(Olaparib, 3)1                              96.00   0.065
## poly(MMS, 3)3:poly(Olaparib, 3)1                              96.00   0.029
## poly(MMS, 3)1:poly(Olaparib, 3)2                              96.00   0.564
## poly(MMS, 3)2:poly(Olaparib, 3)2                              96.00  -0.307
## poly(MMS, 3)3:poly(Olaparib, 3)2                              96.00   0.288
## poly(MMS, 3)1:poly(Olaparib, 3)3                              96.00   0.352
## poly(MMS, 3)2:poly(Olaparib, 3)3                              96.00  -0.514
## poly(MMS, 3)3:poly(Olaparib, 3)3                              96.00  -0.093
## poly(MMS, 3)1:genotypeALC1 KO                                 96.00  -2.028
## poly(MMS, 3)2:genotypeALC1 KO                                 96.00  -0.214
## poly(MMS, 3)3:genotypeALC1 KO                                 96.00  -0.127
## poly(MMS, 3)1:genotypeALC1 KO PARP1 KO                        96.00  -6.588
## poly(MMS, 3)2:genotypeALC1 KO PARP1 KO                        96.00   0.023
## poly(MMS, 3)3:genotypeALC1 KO PARP1 KO                        96.00   1.620
## poly(MMS, 3)1:genotypePARP1 KO                                96.00  -0.040
## poly(MMS, 3)2:genotypePARP1 KO                                96.00  -0.595
## poly(MMS, 3)3:genotypePARP1 KO                                96.00   0.046
## poly(Olaparib, 3)1:genotypeALC1 KO                            32.00  -1.745
## poly(Olaparib, 3)2:genotypeALC1 KO                            32.00   1.062
## poly(Olaparib, 3)3:genotypeALC1 KO                            32.00  -0.215
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO                   32.00   1.065
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO                   32.00   0.593
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO                   32.00  -0.141
## poly(Olaparib, 3)1:genotypePARP1 KO                           32.00   1.661
## poly(Olaparib, 3)2:genotypePARP1 KO                           32.00   0.300
## poly(Olaparib, 3)3:genotypePARP1 KO                           32.00  -0.109
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO              96.00   5.249
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO              96.00  -0.160
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO              96.00  -0.188
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO              96.00  -0.078
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO              96.00   0.618
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO              96.00   0.339
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO              96.00  -1.107
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO              96.00   1.011
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO              96.00  -0.364
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO     96.00   0.974
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO     96.00   0.090
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO     96.00   0.685
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO     96.00   0.202
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO     96.00  -0.005
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO     96.00  -0.296
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO     96.00  -0.545
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO     96.00   0.319
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO     96.00  -0.060
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypePARP1 KO             96.00   0.843
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypePARP1 KO             96.00  -0.481
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypePARP1 KO             96.00   0.214
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypePARP1 KO             96.00   0.032
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypePARP1 KO             96.00   0.038
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypePARP1 KO             96.00  -0.217
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypePARP1 KO             96.00  -0.093
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypePARP1 KO             96.00   0.661
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypePARP1 KO             96.00   0.066
##                                                            Pr(>|t|)    
## (Intercept)                                                 < 2e-16 ***
## poly(MMS, 3)1                                               < 2e-16 ***
## poly(MMS, 3)2                                              0.529771    
## poly(MMS, 3)3                                              0.862708    
## poly(Olaparib, 3)1                                         0.001070 ** 
## poly(Olaparib, 3)2                                         0.515587    
## poly(Olaparib, 3)3                                         0.847428    
## genotypeALC1 KO                                            0.000131 ***
## genotypeALC1 KO PARP1 KO                                   0.355378    
## genotypePARP1 KO                                           2.48e-05 ***
## poly(MMS, 3)1:poly(Olaparib, 3)1                           0.454662    
## poly(MMS, 3)2:poly(Olaparib, 3)1                           0.948043    
## poly(MMS, 3)3:poly(Olaparib, 3)1                           0.976983    
## poly(MMS, 3)1:poly(Olaparib, 3)2                           0.574346    
## poly(MMS, 3)2:poly(Olaparib, 3)2                           0.759165    
## poly(MMS, 3)3:poly(Olaparib, 3)2                           0.773710    
## poly(MMS, 3)1:poly(Olaparib, 3)3                           0.725462    
## poly(MMS, 3)2:poly(Olaparib, 3)3                           0.608328    
## poly(MMS, 3)3:poly(Olaparib, 3)3                           0.925816    
## poly(MMS, 3)1:genotypeALC1 KO                              0.045319 *  
## poly(MMS, 3)2:genotypeALC1 KO                              0.830764    
## poly(MMS, 3)3:genotypeALC1 KO                              0.899350    
## poly(MMS, 3)1:genotypeALC1 KO PARP1 KO                     2.39e-09 ***
## poly(MMS, 3)2:genotypeALC1 KO PARP1 KO                     0.981490    
## poly(MMS, 3)3:genotypeALC1 KO PARP1 KO                     0.108526    
## poly(MMS, 3)1:genotypePARP1 KO                             0.968345    
## poly(MMS, 3)2:genotypePARP1 KO                             0.553527    
## poly(MMS, 3)3:genotypePARP1 KO                             0.963779    
## poly(Olaparib, 3)1:genotypeALC1 KO                         0.090602 .  
## poly(Olaparib, 3)2:genotypeALC1 KO                         0.296268    
## poly(Olaparib, 3)3:genotypeALC1 KO                         0.831243    
## poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO                0.294764    
## poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO                0.557120    
## poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO                0.888778    
## poly(Olaparib, 3)1:genotypePARP1 KO                        0.106410    
## poly(Olaparib, 3)2:genotypePARP1 KO                        0.765907    
## poly(Olaparib, 3)3:genotypePARP1 KO                        0.913886    
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO           9.13e-07 ***
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO           0.873172    
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO           0.851276    
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO           0.937858    
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO           0.537919    
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO           0.735294    
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO           0.270978    
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO           0.314741    
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO           0.716336    
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO  0.332343    
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO  0.928635    
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypeALC1 KO PARP1 KO  0.494905    
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO  0.840703    
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO  0.995720    
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypeALC1 KO PARP1 KO  0.767559    
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO  0.586887    
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO  0.750211    
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypeALC1 KO PARP1 KO  0.952583    
## poly(MMS, 3)1:poly(Olaparib, 3)1:genotypePARP1 KO          0.401498    
## poly(MMS, 3)2:poly(Olaparib, 3)1:genotypePARP1 KO          0.631567    
## poly(MMS, 3)3:poly(Olaparib, 3)1:genotypePARP1 KO          0.831279    
## poly(MMS, 3)1:poly(Olaparib, 3)2:genotypePARP1 KO          0.974842    
## poly(MMS, 3)2:poly(Olaparib, 3)2:genotypePARP1 KO          0.969407    
## poly(MMS, 3)3:poly(Olaparib, 3)2:genotypePARP1 KO          0.828944    
## poly(MMS, 3)1:poly(Olaparib, 3)3:genotypePARP1 KO          0.925841    
## poly(MMS, 3)2:poly(Olaparib, 3)3:genotypePARP1 KO          0.509960    
## poly(MMS, 3)3:poly(Olaparib, 3)3:genotypePARP1 KO          0.947422    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
cat("AIC: ", AIC(fit12))
## AIC:  1613.278
simres <- simulateResiduals(fittedModel = fit12)
plot(simres)

Compare Results

ICtab(fit1,fit2,fit3,fit4,
      fit5,fit6,fit7,fit8,
      fit9,fit10,fit11,fit12,
      base=T)
##       AIC    dAIC   df
## fit7  -520.1    0.0 37
## fit3  -514.2    5.9 17
## fit11 -511.5    8.6 65
## fit6  -227.6  292.5 37
## fit2  -215.9  304.2 17
## fit10 -214.8  305.3 65
## fit12 1613.3 2133.4 66
## fit8  2057.4 2577.5 38
## fit4  2321.9 2842.0 18
## fit1  2684.9 3205.0 17
## fit5  2717.9 3238.0 37
## fit9  2768.2 3288.2 65

Final Result

fit <- fit7

output <- coef(summary(fit))
output <- output[grep("MMS|Olaparib", rownames(output)),]

rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output) )
rownames(output) <- gsub("genotype",  paste0(" ",levels(dataset$genotype)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$genotype)[1],  sep = " in " )

# suggested result table
kable(output, row.names = T)
Estimate Std. Error t value Pr(>|t|)
MMS1 in WT -1.9820806 0.1142859 -17.3431838 0.0000000
MMS2 in WT 0.1255846 0.1142859 1.0988643 0.2735203
Olaparib1 in WT -2.1496148 0.1142859 -18.8091062 0.0000000
Olaparib2 in WT -0.3569409 0.1142859 -3.1232292 0.0021328
MMS1:Olaparib1 in WT -2.7720737 1.5835913 -1.7504982 0.0819983
MMS2:Olaparib1 in WT 0.5884996 1.5835913 0.3716234 0.7106775
MMS1:Olaparib2 in WT 1.6424281 1.5835913 1.0371540 0.3012690
MMS2:Olaparib2 in WT -0.6500546 1.5835913 -0.4104939 0.6820069
MMS1: WT vs. ALC1 KO -0.0986626 0.1616246 -0.6104431 0.5424566
MMS2: WT vs. ALC1 KO -0.0868971 0.1616246 -0.5376476 0.5915865
MMS1: WT vs. ALC1 KO PARP1 KO -1.4001079 0.1616246 -8.6627151 0.0000000
MMS2: WT vs. ALC1 KO PARP1 KO -0.0594307 0.1616246 -0.3677083 0.7135892
MMS1: WT vs. PARP1 KO -1.2229177 0.1616246 -7.5664079 0.0000000
MMS2: WT vs. PARP1 KO -0.1894742 0.1616246 -1.1723102 0.2428597
Olaparib1: WT vs. ALC1 KO -0.8335123 0.1616246 -5.1570878 0.0000008
Olaparib2: WT vs. ALC1 KO 0.8008124 0.1616246 4.9547675 0.0000019
Olaparib1: WT vs. ALC1 KO PARP1 KO 0.9692179 0.1616246 5.9967221 0.0000000
Olaparib2: WT vs. ALC1 KO PARP1 KO 0.4746879 0.1616246 2.9369777 0.0038166
Olaparib1: WT vs. PARP1 KO 0.9679212 0.1616246 5.9886992 0.0000000
Olaparib2: WT vs. PARP1 KO 0.1348212 0.1616246 0.8341628 0.4054648
MMS1:Olaparib1: WT vs. ALC1 KO 17.6681357 2.2395363 7.8891939 0.0000000
MMS2:Olaparib1: WT vs. ALC1 KO -0.8649597 2.2395363 -0.3862227 0.6998580
MMS1:Olaparib2: WT vs. ALC1 KO -1.0456296 2.2395363 -0.4668956 0.6412260
MMS2:Olaparib2: WT vs. ALC1 KO 2.2067138 2.2395363 0.9853441 0.3259809
MMS1:Olaparib1: WT vs. ALC1 KO PARP1 KO 5.2229965 2.2395363 2.3321777 0.0209695
MMS2:Olaparib1: WT vs. ALC1 KO PARP1 KO -0.4217179 2.2395363 -0.1883059 0.8508816
MMS1:Olaparib2: WT vs. ALC1 KO PARP1 KO 0.2362858 2.2395363 0.1055066 0.9161094
MMS2:Olaparib2: WT vs. ALC1 KO PARP1 KO -0.2109463 2.2395363 -0.0941920 0.9250775
MMS1:Olaparib1: WT vs. PARP1 KO 4.6766498 2.2395363 2.0882224 0.0384024
MMS2:Olaparib1: WT vs. PARP1 KO -3.2057139 2.2395363 -1.4314186 0.1543106
MMS1:Olaparib2: WT vs. PARP1 KO 1.1063754 2.2395363 0.4940199 0.6219870
MMS2:Olaparib2: WT vs. PARP1 KO -0.4482443 2.2395363 -0.2001505 0.8416235
write.table(output, file = "Figure3B_Stats_Ref_WT.txt", quote = F, sep = "\t", row.names = T, col.names = NA)
# re-fit with ALC1KO reference
dataset$genotype <- relevel(dataset$genotype, ref = "ALC1 KO")
   

fit <- lm(NormCounts2 ~ poly(MMS,2)*poly(Olaparib,2)*genotype, data = dataset)

output <- coef(summary(fit))
output <- output[grep("MMS|Olaparib", rownames(output)),]

rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output) )
rownames(output) <- gsub("genotype",  paste0(" ",levels(dataset$genotype)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$genotype)[1],  sep = " in " )

# suggested result table
kable(output, row.names = T)
Estimate Std. Error t value Pr(>|t|)
MMS1 in ALC1 KO -2.0807432 0.1142859 -18.2064806 0.0000000
MMS2 in ALC1 KO 0.0386876 0.1142859 0.3385158 0.7354297
Olaparib1 in ALC1 KO -2.9831271 0.1142859 -26.1023298 0.0000000
Olaparib2 in ALC1 KO 0.4438714 0.1142859 3.8838702 0.0001515
MMS1:Olaparib1 in ALC1 KO 14.8960620 1.5835913 9.4065067 0.0000000
MMS2:Olaparib1 in ALC1 KO -0.2764601 1.5835913 -0.1745780 0.8616376
MMS1:Olaparib2 in ALC1 KO 0.5967985 1.5835913 0.3768640 0.7067868
MMS2:Olaparib2 in ALC1 KO 1.5566592 1.5835913 0.9829931 0.3271329
MMS1: ALC1 KO vs. WT 0.0986626 0.1616246 0.6104431 0.5424566
MMS2: ALC1 KO vs. WT 0.0868971 0.1616246 0.5376476 0.5915865
MMS1: ALC1 KO vs. ALC1 KO PARP1 KO -1.3014453 0.1616246 -8.0522720 0.0000000
MMS2: ALC1 KO vs. ALC1 KO PARP1 KO 0.0274664 0.1616246 0.1699393 0.8652780
MMS1: ALC1 KO vs. PARP1 KO -1.1242551 0.1616246 -6.9559649 0.0000000
MMS2: ALC1 KO vs. PARP1 KO -0.1025771 0.1616246 -0.6346626 0.5265782
Olaparib1: ALC1 KO vs. WT 0.8335123 0.1616246 5.1570878 0.0000008
Olaparib2: ALC1 KO vs. WT -0.8008124 0.1616246 -4.9547675 0.0000019
Olaparib1: ALC1 KO vs. ALC1 KO PARP1 KO 1.8027302 0.1616246 11.1538099 0.0000000
Olaparib2: ALC1 KO vs. ALC1 KO PARP1 KO -0.3261245 0.1616246 -2.0177898 0.0453274
Olaparib1: ALC1 KO vs. PARP1 KO 1.8014335 0.1616246 11.1457871 0.0000000
Olaparib2: ALC1 KO vs. PARP1 KO -0.6659911 0.1616246 -4.1206048 0.0000612
MMS1:Olaparib1: ALC1 KO vs. WT -17.6681357 2.2395363 -7.8891939 0.0000000
MMS2:Olaparib1: ALC1 KO vs. WT 0.8649597 2.2395363 0.3862227 0.6998580
MMS1:Olaparib2: ALC1 KO vs. WT 1.0456296 2.2395363 0.4668956 0.6412260
MMS2:Olaparib2: ALC1 KO vs. WT -2.2067138 2.2395363 -0.9853441 0.3259809
MMS1:Olaparib1: ALC1 KO vs. ALC1 KO PARP1 KO -12.4451392 2.2395363 -5.5570162 0.0000001
MMS2:Olaparib1: ALC1 KO vs. ALC1 KO PARP1 KO 0.4432418 2.2395363 0.1979168 0.8433678
MMS1:Olaparib2: ALC1 KO vs. ALC1 KO PARP1 KO 1.2819153 2.2395363 0.5724021 0.5678736
MMS2:Olaparib2: ALC1 KO vs. ALC1 KO PARP1 KO -2.4176601 2.2395363 -1.0795360 0.2820151
MMS1:Olaparib1: ALC1 KO vs. PARP1 KO -12.9914859 2.2395363 -5.8009714 0.0000000
MMS2:Olaparib1: ALC1 KO vs. PARP1 KO -2.3407542 2.2395363 -1.0451960 0.2975493
MMS1:Olaparib2: ALC1 KO vs. PARP1 KO 2.1520050 2.2395363 0.9609155 0.3380817
MMS2:Olaparib2: ALC1 KO vs. PARP1 KO -2.6549581 2.2395363 -1.1854946 0.2376246
write.table(output, file = "Figure3B_Stats_Ref_ALC1.txt", quote = F, sep = "\t", row.names = T, col.names = NA)
# re-fit with ALC1 KO PARP1 KO reference
dataset$genotype <- relevel(dataset$genotype, ref = "ALC1 KO PARP1 KO ")
   

fit <- lm(NormCounts2 ~ poly(MMS,2)*poly(Olaparib,2)*genotype, data = dataset)

output <- coef(summary(fit))
output <- output[grep("MMS|Olaparib", rownames(output)),]

rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output) )
rownames(output) <- gsub("genotype",  paste0(" ",levels(dataset$genotype)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$genotype)[1],  sep = " in " )

# suggested result table
kable(output, row.names = T)
Estimate Std. Error t value Pr(>|t|)
MMS1 in ALC1 KO PARP1 KO -3.3821885 0.1142859 -29.5941129 0.0000000
MMS2 in ALC1 KO PARP1 KO 0.0661539 0.1142859 0.5788463 0.5635277
Olaparib1 in ALC1 KO PARP1 KO -1.1803969 0.1142859 -10.3284605 0.0000000
Olaparib2 in ALC1 KO PARP1 KO 0.1177470 0.1142859 1.0302845 0.3044712
MMS1:Olaparib1 in ALC1 KO PARP1 KO 2.4509228 1.5835913 1.5476991 0.1237210
MMS2:Olaparib1 in ALC1 KO PARP1 KO 0.1667817 1.5835913 0.1053186 0.9162583
MMS1:Olaparib2 in ALC1 KO PARP1 KO 1.8787139 1.5835913 1.1863628 0.2372827
MMS2:Olaparib2 in ALC1 KO PARP1 KO -0.8610009 1.5835913 -0.5437015 0.5874231
MMS1: ALC1 KO PARP1 KO vs. ALC1 KO 1.3014453 0.1616246 8.0522720 0.0000000
MMS2: ALC1 KO PARP1 KO vs. ALC1 KO -0.0274664 0.1616246 -0.1699393 0.8652780
MMS1: ALC1 KO PARP1 KO vs. WT 1.4001079 0.1616246 8.6627151 0.0000000
MMS2: ALC1 KO PARP1 KO vs. WT 0.0594307 0.1616246 0.3677083 0.7135892
MMS1: ALC1 KO PARP1 KO vs. PARP1 KO 0.1771902 0.1616246 1.0963072 0.2746339
MMS2: ALC1 KO PARP1 KO vs. PARP1 KO -0.1300435 0.1616246 -0.8046019 0.4222739
Olaparib1: ALC1 KO PARP1 KO vs. ALC1 KO -1.8027302 0.1616246 -11.1538099 0.0000000
Olaparib2: ALC1 KO PARP1 KO vs. ALC1 KO 0.3261245 0.1616246 2.0177898 0.0453274
Olaparib1: ALC1 KO PARP1 KO vs. WT -0.9692179 0.1616246 -5.9967221 0.0000000
Olaparib2: ALC1 KO PARP1 KO vs. WT -0.4746879 0.1616246 -2.9369777 0.0038166
Olaparib1: ALC1 KO PARP1 KO vs. PARP1 KO -0.0012967 0.1616246 -0.0080229 0.9936090
Olaparib2: ALC1 KO PARP1 KO vs. PARP1 KO -0.3398666 0.1616246 -2.1028150 0.0370872
MMS1:Olaparib1: ALC1 KO PARP1 KO vs. ALC1 KO 12.4451392 2.2395363 5.5570162 0.0000001
MMS2:Olaparib1: ALC1 KO PARP1 KO vs. ALC1 KO -0.4432418 2.2395363 -0.1979168 0.8433678
MMS1:Olaparib2: ALC1 KO PARP1 KO vs. ALC1 KO -1.2819153 2.2395363 -0.5724021 0.5678736
MMS2:Olaparib2: ALC1 KO PARP1 KO vs. ALC1 KO 2.4176601 2.2395363 1.0795360 0.2820151
MMS1:Olaparib1: ALC1 KO PARP1 KO vs. WT -5.2229965 2.2395363 -2.3321777 0.0209695
MMS2:Olaparib1: ALC1 KO PARP1 KO vs. WT 0.4217179 2.2395363 0.1883059 0.8508816
MMS1:Olaparib2: ALC1 KO PARP1 KO vs. WT -0.2362858 2.2395363 -0.1055066 0.9161094
MMS2:Olaparib2: ALC1 KO PARP1 KO vs. WT 0.2109463 2.2395363 0.0941920 0.9250775
MMS1:Olaparib1: ALC1 KO PARP1 KO vs. PARP1 KO -0.5463467 2.2395363 -0.2439553 0.8075860
MMS2:Olaparib1: ALC1 KO PARP1 KO vs. PARP1 KO -2.7839960 2.2395363 -1.2431127 0.2156914
MMS1:Olaparib2: ALC1 KO PARP1 KO vs. PARP1 KO 0.8700897 2.2395363 0.3885133 0.6981659
MMS2:Olaparib2: ALC1 KO PARP1 KO vs. PARP1 KO -0.2372980 2.2395363 -0.1059586 0.9157514
write.table(output, file = "Figure3B_Stats_Ref_ALC1_PARP1.txt", quote = F, sep = "\t", row.names = T, col.names = NA)
# re-fit with PARP1 KO reference
dataset$genotype <- relevel(dataset$genotype, ref = "PARP1 KO")
   

fit <- lm(NormCounts2 ~ poly(MMS,2)*poly(Olaparib,2)*genotype, data = dataset)

output <- coef(summary(fit))
output <- output[grep("MMS|Olaparib", rownames(output)),]

rownames(output) <- gsub("poly\\(|, [1-3]\\)","", rownames(output) )
rownames(output) <- gsub("genotype",  paste0(" ",levels(dataset$genotype)[1], " vs. "), rownames(output))
rownames(output)[!(grepl("vs", rownames(output)))] <- paste(rownames(output)[!(grepl("vs", rownames(output)))], levels(dataset$genotype)[1],  sep = " in " )

# suggested result table
kable(output, row.names = T)
Estimate Std. Error t value Pr(>|t|)
MMS1 in PARP1 KO -3.2049983 0.1142859 -28.0437005 0.0000000
MMS2 in PARP1 KO -0.0638895 0.1142859 -0.5590327 0.5769410
Olaparib1 in PARP1 KO -1.1816936 0.1142859 -10.3398065 0.0000000
Olaparib2 in PARP1 KO -0.2221197 0.1142859 -1.9435449 0.0537502
MMS1:Olaparib1 in PARP1 KO 1.9045761 1.5835913 1.2026942 0.2309169
MMS2:Olaparib1 in PARP1 KO -2.6172144 1.5835913 -1.6527082 0.1004015
MMS1:Olaparib2 in PARP1 KO 2.7488035 1.5835913 1.7358037 0.0845731
MMS2:Olaparib2 in PARP1 KO -1.0982989 1.5835913 -0.6935495 0.4889961
MMS1: PARP1 KO vs. ALC1 KO PARP1 KO -0.1771902 0.1616246 -1.0963072 0.2746339
MMS2: PARP1 KO vs. ALC1 KO PARP1 KO 0.1300435 0.1616246 0.8046019 0.4222739
MMS1: PARP1 KO vs. ALC1 KO 1.1242551 0.1616246 6.9559649 0.0000000
MMS2: PARP1 KO vs. ALC1 KO 0.1025771 0.1616246 0.6346626 0.5265782
MMS1: PARP1 KO vs. WT 1.2229177 0.1616246 7.5664079 0.0000000
MMS2: PARP1 KO vs. WT 0.1894742 0.1616246 1.1723102 0.2428597
Olaparib1: PARP1 KO vs. ALC1 KO PARP1 KO 0.0012967 0.1616246 0.0080229 0.9936090
Olaparib2: PARP1 KO vs. ALC1 KO PARP1 KO 0.3398666 0.1616246 2.1028150 0.0370872
Olaparib1: PARP1 KO vs. ALC1 KO -1.8014335 0.1616246 -11.1457871 0.0000000
Olaparib2: PARP1 KO vs. ALC1 KO 0.6659911 0.1616246 4.1206048 0.0000612
Olaparib1: PARP1 KO vs. WT -0.9679212 0.1616246 -5.9886992 0.0000000
Olaparib2: PARP1 KO vs. WT -0.1348212 0.1616246 -0.8341628 0.4054648
MMS1:Olaparib1: PARP1 KO vs. ALC1 KO PARP1 KO 0.5463467 2.2395363 0.2439553 0.8075860
MMS2:Olaparib1: PARP1 KO vs. ALC1 KO PARP1 KO 2.7839960 2.2395363 1.2431127 0.2156914
MMS1:Olaparib2: PARP1 KO vs. ALC1 KO PARP1 KO -0.8700897 2.2395363 -0.3885133 0.6981659
MMS2:Olaparib2: PARP1 KO vs. ALC1 KO PARP1 KO 0.2372980 2.2395363 0.1059586 0.9157514
MMS1:Olaparib1: PARP1 KO vs. ALC1 KO 12.9914859 2.2395363 5.8009714 0.0000000
MMS2:Olaparib1: PARP1 KO vs. ALC1 KO 2.3407542 2.2395363 1.0451960 0.2975493
MMS1:Olaparib2: PARP1 KO vs. ALC1 KO -2.1520050 2.2395363 -0.9609155 0.3380817
MMS2:Olaparib2: PARP1 KO vs. ALC1 KO 2.6549581 2.2395363 1.1854946 0.2376246
MMS1:Olaparib1: PARP1 KO vs. WT -4.6766498 2.2395363 -2.0882224 0.0384024
MMS2:Olaparib1: PARP1 KO vs. WT 3.2057139 2.2395363 1.4314186 0.1543106
MMS1:Olaparib2: PARP1 KO vs. WT -1.1063754 2.2395363 -0.4940199 0.6219870
MMS2:Olaparib2: PARP1 KO vs. WT 0.4482443 2.2395363 0.2001505 0.8416235
write.table(output, file = "Figure3B_Stats_Ref_PARP1.txt", quote = F, sep = "\t", row.names = T, col.names = NA)

Anova

fit7a <- lm(NormCounts2 ~ poly(MMS,2)*poly(Olaparib,2)*genotype, data = dataset)
fit7b <- lm(NormCounts2 ~ poly(MMS,2)*poly(Olaparib,2)+genotype, data = dataset)

# anova table
anova(fit7a, fit7b)
## Analysis of Variance Table
## 
## Model 1: NormCounts2 ~ poly(MMS, 2) * poly(Olaparib, 2) * genotype
## Model 2: NormCounts2 ~ poly(MMS, 2) * poly(Olaparib, 2) + genotype
##   Res.Df     RSS  Df Sum of Sq      F    Pr(>F)    
## 1    156 0.50939                                   
## 2    180 1.82105 -24   -1.3117 16.737 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1